Free online tools · Browser-first utilities · No account required
Home / Developer Tools / Regex Match Extractor
Developer Tools

Regex Match Extractor

Extract text matches using a JavaScript regular expression and optional flags.

Using Regex Match Extractor

On this page
  1. Using Regex Match Extractor
  2. Input reference
  3. Continue your task

Put the text in the first field and the expression in the second. For example, a digit pattern can find separate numbers in a sentence. Test a nonmatching line and a boundary case. Large or complex patterns can be expensive, so start with a short sample.

Example input

Text to search
Order 42, item 7
Regular expression
\d+

Example result

42
7

Read next · How to Choose the Right Online Tool

Input reference

Text to search
Enter multiline text. Field hint — Enter or paste your input here….
Regular expression
Enter text. Field hint — \b\w+\b.
Report a correction

← Browse all 311 tools