← Code tools

Code Tool

Regex Tester

Test regular expressions against sample text with live matches, capture groups, flags, indexes and friendly errors before using the pattern in code.

Test a regular expression

Enter a pattern, choose flags and test it against sample text with live results.

StatusRegex ready

Edit the pattern or test text to update matches.

Your regex and test text are processed in your browser and are not uploaded.

Match preview

DevKitYard hello@example.com support@devkityard.com https://www.devkityard.com Order ID: DKY-2048
Matches2
Flagsgi
Text characters97
hello@example.comIndex 11
support@devkityard.comIndex 29

How to Use Regex Tester

  1. Enter a regular expression pattern.
  2. Choose the flags your code will use.
  3. Paste sample text to test against the pattern.
  4. Review matches, capture groups and any regex errors before copying the pattern.

FAQ

Can I test capture groups?

Yes. Matching results include capture group details so you can confirm the pattern extracts the right text.

Which regex flags can I use?

Use common JavaScript flags such as global, ignore case, multiline, dotAll, unicode and sticky where supported.

Does this use JavaScript regex syntax?

Yes. Results reflect the browser's JavaScript regular expression engine.

Will invalid regex patterns crash the page?

No. Invalid patterns show a friendly error message and keep your input available for editing.