All 127 tools

Regex Tester

Test JavaScript regular expressions against sample text with live match highlighting, capture groups and replace preview.

Runs in your browser. Nothing you paste is sent anywhere.

3 matches.

Output
Orders: ORD-20931 (₹709, 14 Oct 2026), ORD-20932 (₹1,250, 15 Oct 2026), ref ord-77
#MatchIndexGroups
1ORD-209318$1=20931
2ORD-2093239$1=20932
3ord-7776$1=77

About this tool

Type a pattern and flags; matches are listed with their position and capture groups. Add a replacement to preview a find-and-replace using $1, $2 or named groups.

Building and testing regular expressions with confidence

Regular expressions are powerful for finding and changing text, but they are notoriously easy to get slightly wrong. A pattern that works on one example can fail on another, or match far more than intended. Testing it against realistic sample text, with matches highlighted as you type, is the fastest way to build a pattern you can trust. This tester uses JavaScript's regex engine, the same one that runs in browsers and Node.js.

Each match is listed with its position and any capture groups, so you can confirm that the parts you want to extract are being captured correctly. Flags change how the pattern behaves: g finds every match rather than the first, i ignores case, m makes ^ and $ work on each line, s lets the dot match line breaks, and u enables full Unicode support. If you type a replacement, you can see the result of the substitution, with references such as $1 or named groups filled in, before applying it to real data.

Start simple and build up. Write a pattern for the most common case, test it, then add handling for variations one step at a time. Paste in examples that should not match as well as ones that should, since false matches cause as many bugs as missed ones. Be careful with patterns like .* that can match far more than expected, and prefer specific character classes. For validating things like email addresses, keep the pattern reasonable rather than trying to cover every rule. Everything runs in your browser, so log files and customer data stay private.

How to use it

  1. Paste your text into the input box, or open a file from your device.
  2. Adjust the options. The result updates instantly.
  3. Copy the result, or download it as a file where offered.

Questions

Which regex flavour does this use?

JavaScript (ECMAScript), the same engine your browser and Node.js use. Most syntax also works in Python and PCRE, but lookbehind and named-group syntax can differ.

What do the flags mean?

g finds all matches, i ignores case, m makes ^ and $ match at line breaks, s lets . match newlines, and u enables full Unicode.

Last reviewed 16 October 2026.