Searchlight
Tools
BlogAbout
Free SEO Audit
Back to home
๐Ÿ“ˆSEO & Analytics
๐Ÿ—‚๏ธText & Data
๐Ÿ”Encoders & Decoders
โšกGenerators
๐Ÿ”„Converters
๐Ÿ–ผ๏ธImage Tools
๐Ÿ“„PDF Tools
๐Ÿ’ปCode Tools
๐Ÿ”Regex & Parsing
Regex TesterRegex VisualizerRegex CheatsheetCron Tester
๐ŸงฎCalculators
๐Ÿ—บ๏ธDiagrams
๐ŸŒNetwork & Web
โœ๏ธText Utilities
๐ŸŽจColor Tools
๐Ÿ”€Diff & Compare
148+ tools. OAuth is read-only.
Searchlight

148+ free SEO, developer, image, PDF, and productivity tools - no account needed.

Free ยท all tools included
Company
  • Blog
  • About
  • Free SEO Audit
Legal
  • Privacy Policy
  • Terms of Service
  • Cookie Policy

ยฉ 2026 Searchlight. All rights reserved.

Read-only OAuth ยท No data reselling ยท Completely free

Regex Tester

Test regular expressions live. All matches are highlighted as you type.

//
7 matches
Hello world! Test 123 and test@email.com
1Helloindex 0
2worldindex 6
3Testindex 13
4andindex 22
5testindex 26
6emailindex 31
7comindex 37

About this tool

Test and debug regular expressions in real time with live match highlighting, capture group display, and a flags selector. Write your regex, enter your test string, and see every match highlighted as you type. Supports all JavaScript regex syntax including lookaheads, lookbehinds, named capture groups, and Unicode mode.

How to Test a Regular Expression Online

  1. 1Enter your regular expression in the Regex field (without / delimiters).
  2. 2Select the flags you need (g for all matches, i for case-insensitive, etc.).
  3. 3Type or paste your test string in the Test String area.
  4. 4Matches are highlighted in real time as you type.
  5. 5Review capture groups and match positions in the results panel.

Frequently Asked Questions

What regex flavour does this tool use?+
JavaScript's built-in RegExp engine. This is compatible with most modern languages, though some advanced features (like possessive quantifiers) are JS-specific.
What do the flags g, i, m, s, u, d mean?+
g = global (find all matches, not just first), i = case-insensitive, m = multiline (^ and $ match line starts/ends), s = dotAll (. matches newlines), u = Unicode mode, d = generate match indices.
How do I test for an exact string match?+
Use ^ and $ anchors: ^your exact string$. Without anchors, the regex will match your string anywhere in the text.
How do I match an email address with regex?+
A simple pattern: [a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}. For production use, HTML's built-in email validation (type='email') or a library is more reliable.
Looking for a deeper guide on this topic? Browse the Searchlight blog.
Visit the blog โ†’

Related tools

View all Regex & Parsing โ†’
Regex VisualizerVisual diagram of regex structureRegex CheatsheetQuick reference for regex syntaxCron TesterTest cron expressions with next-run preview