Text and data

How to test a regular expression

A pattern should extract or accept a sample and you need to see the match. Test it on Regex Tester.

A regex result is the JavaScript matches and groups for one sample, or a real non-match.
A regex result is the JavaScript matches and groups for one sample, and a sample match is not a safety proof.

What to run

Open Regex Tester. It stays in the browser.

How to read the result

Matches are what JavaScript found, with groups.

No match is a real result.

Flags change it: i ignores case, m changes anchors, g finds more than one.

A match on a sample is not proof it is safe on untrusted input.

What to open next

Open Find and Replace if the pattern is only for a one-off edit. It stays in the browser.

Open Email Validator for a single address rather than a homemade email regex. It checks syntax only and stays in the browser.