Skip to main content

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.

FeatureFreeProSelf-hosted
Text and binary file loadingIncluded: single-file loadingIncludedIncluded
Office, PDF, gzip and multiple-file operationsUnavailableIncludedText processing bundle

Open a file​

  1. Open the test string editor.
  2. Right-click a test-string tab and select Load files….
  3. Select a file from your computer.
  4. If a format dialog opens, choose Open as Text, Extract Text, or Open as Binary.
  5. 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.

Select browse files in the empty test string editor, then choose orders.txt.
Empty test string editor with the browse files control beside its placeholder.

After you choose the file, its contents appear in Test String. Match Information shows both order identifiers and their captured numbers.

The imported file produces two matches. Group 1 contains 0042 and 0187.
The contents of orders.txt in the test string editor, with ORD-0042 and ORD-0187 matched.

Supported formats​

regex101 recognizes files by their extension or type.

File typeRecognized examplesResult
Text.txt, .text, .log, .csv, .tsv, .json, .jsonl, .xml, .html, .css, .js, .ts, .md, .yamlText from the file
BinaryAny fileOne character for each byte value
Word document.docxExtracted document text
OpenDocument text.odtExtracted document text
PDF.pdfSearchable text from the pages
GZIP.gzText 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​

ProblemNext action
Invalid fileVerify that the file opens in its normal application and that its extension matches its contents.
No searchable textExport text from the source document or supply a text-based PDF.
Too large for the editorUse a smaller extract or remove existing input before retrying.
Unreadable charactersVerify 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.

Use File loading to select a prompt, automatic text extraction, or binary input.
Files and Input Settings with the File loading menu open and Ask every time selected.
Extract searchable text from a PDF and match its records.
Extract text from a Word document and verify the matches.
Load compressed log samples into separate inputs and inspect their results.