Load files into the editor
Load a file to use its contents in Regex Editor or Text Pipeline. You can read text, inspect binary data, or extract text from supported documents.
| Feature | Free | Pro | Self-hosted |
|---|---|---|---|
| Text and binary file loading | Included: single-file loading | Included | Included |
| Office, PDF, gzip and multiple-file operations | Unavailable | Included | Text processing bundle |
Open a file
- Open the test string editor.
- Right-click a test-string tab and select Load files….
- Select a file from your computer.
- If a format dialog opens, choose Open as Text, Extract Text, or Open as Binary.
- Inspect the resulting input before applying your pattern.
You can also select browse files in an empty test string, or drag a file into the editor's drop area.
Insertion uses the current editor position or selection. It does not automatically replace the entire test string.
Text files keep their original line endings.
Download orders.txt, or save the following text as orders.txt:
ORD-0042 pending
ORD-0187 sent
Include a line break after the second line. Use JavaScript, the gm flags, and this pattern:
\bORD-([0-9]{4})\b
The expected matches are ORD-0042 and ORD-0187. Group 1 contains 0042 and 0187.
After you choose the file, its contents appear in Test String. Match Information shows both order identifiers and their captured numbers.
Supported formats
regex101 recognizes files by their extension or type.
| File type | Recognized examples | Result |
|---|---|---|
| Text | .txt, .text, .log, .csv, .tsv, .json, .jsonl, .xml, .html, .css, .js, .ts, .md, .yaml | Text from the file |
| Binary | Any file | One character for each byte value |
| Word document | .docx | Extracted document text |
| OpenDocument text | .odt | Extracted document text |
.pdf | Searchable text from the pages | |
| GZIP | .gz | Text from decompressed contents |
Text formats also include JSX, TSX, Markdown, and YML. Damaged files can fail to open.
Text extraction does not support legacy .doc files, spreadsheets, ZIP archives, or image OCR. Binary mode reads bytes instead.
Multiple files and destinations
Selecting several files creates separate test strings in the matching, substitution, and extraction editors.
In Text Pipeline, load files into the pinned Input tab. Multiple files join into one input with line breaks between them. The Insert at cursor drop target inserts text at the current position or replaces the selected text.
Extraction and privacy
regex101 reads and processes files in your browser. Saving a workspace sends its input to regex101. See privacy and local processing for the processing and sharing details.
Document extraction does not preserve the original layout or formatting. PDF extraction requires searchable text and does not recognize text in scanned images.
If a PDF requires a password, the application requests it. The extraction result can differ from the document's visual reading order.
Size and processing limits
Large files can exceed the editor's size limit or available browser memory. Compressed and formatted files can expand during extraction.
Start with a small sample. If a file is too large, use a smaller extract or remove existing input before retrying.
Resolve a file error
| Problem | Next action |
|---|---|
| Invalid file | Verify that the file opens in its normal application and that its extension matches its contents. |
| No searchable text | Export text from the source document or supply a text-based PDF. |
| Too large for the editor | Use a smaller extract or remove existing input before retrying. |
| Unreadable characters | Verify whether text decoding or binary byte inspection is appropriate. |
Choose an opening mode
Remember this choice stores the selected opening mode. Open Settings > Files & Input to change file-loading configuration.
The File loading choices are Ask every time, Extract text automatically, and Always load as binary.