Regex Tester Online Free

Test regex patterns against sample text and review live matches.

Live matching Flags support Match highlighting
MATCHES RESULT
Run test to see matching groups.

What Regex Tester actually does

Regex Tester uses a regular expression, flags and sample text to compile the supplied JavaScript regular expression and list matches in the sample text. In the browser, Regex Tester uses a regular expression, flags and sample text to compile the supplied JavaScript regular expression and list matches in the sample text. Regex Tester then places the match report in the result panel.

Regex Tester syntax and encoding assumptions

For Regex Tester, patterns and flags use the current browser JavaScript RegExp implementation. For Regex Tester, matching operates on JavaScript strings and indices are UTF-16 code-unit offsets.

Regex Tester example

Regex Tester example input: Pattern = \d+; flags = g; sample text = Item 12 Regex Tester expected result: The sample match report contains 12. To verify Regex Tester, reproduce its worked example and compare the displayed or downloaded match report with the stated expected result. When Regex Tester returns a file, open the download and inspect every affected page or image.

What happens when the input cannot be used

Regex Tester rejects an empty pattern and catches RegExp construction or matchAll errors. For Regex Tester, a non-global flag set can also make matchAll throw.

Important safety information

For Regex Tester, a pathological regular expression can consume significant browser CPU; this tester is not a sandbox or production input-security review.

How your data is handled

Regex Tester runs the regex tester operation in the current browser session. Regex Tester reads and processes the supplied values in the current browser and does not submit them to an application endpoint. Browser extensions, device security and any manual sharing or download from Regex Tester remain outside the tool’s control.

Regex Tester limits and unusual cases

For Regex Tester, no explicit text-length, file-size or numeric-range cap is enforced by this operation code. With Regex Tester, empty input can produce an empty result or a validation message; With Regex Tester, characters, formats or browser features outside those handled by the operation may change or prevent the result.

Tools related to Regex Tester

After using Regex Tester, you may also find these tools useful: json-formatter, sql-formatter, slug-generator.

ADVERTISEMENT

Frequently asked questions

In the browser, Regex Tester uses a regular expression, flags and sample text to compile the supplied JavaScript regular expression and list matches in the sample text. Regex Tester then places the match report in the result panel.
Pattern = \d+; flags = g; sample text = Item 12. Regex Tester expected result: The sample match report contains 12.
For Regex Tester, patterns and flags use the current browser JavaScript RegExp implementation. For Regex Tester, matching operates on JavaScript strings and indices are UTF-16 code-unit offsets.
Regex Tester rejects an empty pattern and catches RegExp construction or matchAll errors. For Regex Tester, a non-global flag set can also make matchAll throw.
For Regex Tester, a pathological regular expression can consume significant browser CPU; this tester is not a sandbox or production input-security review.
Regex Tester runs the regex tester operation in the current browser session. Regex Tester reads and processes the supplied values in the current browser and does not submit them to an application endpoint. Browser extensions, device security and any manual sharing or download from Regex Tester remain outside the tool’s control.
ADVERTISEMENT
ADVERTISEMENT