Regex Tester
Test regular expressions online with real-time matching and group extraction. Free regex tester with flags support.
Output will appear here...
What is Regex Tester?
A regular expression (regex) is a pattern-matching language used to search, validate, and extract text. Common uses include form validation (email, phone), log parsing, search-and-replace operations, and data extraction. Regex uses special characters like \d (digit), \w (word), . (any), * (zero or more), + (one or more) to define patterns.
How to Use
- Enter your regex pattern in the Pattern field (e.g., \d+ to match numbers)
- Set flags: g (global), i (case-insensitive), m (multiline) as needed
- Type or paste the test text in the input area below
- Matches appear in real-time with index positions and captured groups
- Click Test to force a re-evaluation, or just keep typing for live updates
Examples
Match email addresses
Extract numbers from text
Related Tools
JSON Formatter & Minifier
Format, beautify, and minify JSON online. Free JSON formatter with syntax validation and error highlighting.
CSS to Tailwind Converter
Convert CSS properties to Tailwind CSS classes instantly. Free online CSS to Tailwind converter with 100+ property mappings.
Slug Generator
Convert any text to a URL-friendly slug. Free online slug generator with options for separator and transliteration.
Case Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and more. Free online case converter.
Frequently Asked Questions
What regex flags should I use?
g = global (find all matches, not just the first). i = case-insensitive. m = multiline (^ and $ match per line). s = dot matches newlines. For most validation tasks, start without flags and add them as needed.
Why does my regex show 'No matches'?
Check that your pattern doesn't have unescaped special characters. Use \ to escape characters like . * + ? ( ) [ ] { } \ ^ $. Also verify your flags — the g flag is needed to find all matches.
What's the difference between greedy and lazy matching?
Greedy (*, +) matches as much as possible. Lazy (*?, +?) matches as little as possible. For example, <.*> on '<a><b>' matches the whole string (greedy), while <.*?> matches '<a>' then '<b>' separately (lazy).