Free online regex tester. Test JavaScript regular expressions with live match highlighting, capture groups, and flags. No signup, runs in your browser.
A regex tester lets you write a regular expression pattern, apply it to test text, and immediately see which parts of the text match. This real-time feedback loop makes it dramatically easier to develop and debug regular expressions compared to testing them in code.
Regular expressions (regex) are patterns used to match character combinations in strings. They're supported in virtually every programming language and are essential for text processing, validation, search, and data extraction.
Regular expressions use a concise syntax to describe text patterns:
hello matches the exact text "hello"[aeiou] matches any vowel, \\d matches any digit+ (one or more), * (zero or more), {3} (exactly 3)^ matches start of line, $ matches end of line(abc) captures "abc" as a group, (?:abc) is non-capturingcat|dog matches "cat" or "dog"Email validation: [\\w.-]+@[\\w.-]+\\.\\w+
Phone number: \\(?\\d{3}\\)?[-.\\s]?\\d{3}[-.\\s]?\\d{4}
URL: https?://[\\w.-]+(/[\\w.-]*)*
IP address: \\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\b
/hello/i matches "Hello", "HELLO", "hElLo"^ and $ match at line boundaries, not just string start/end. match newline characters tooParentheses create capture groups that extract parts of the match. For example, (\\d{4})-(\\d{2})-(\\d{2}) applied to "2024-01-15" captures "2024", "01", and "15" as separate groups. This tool displays group values for each match.
All regex testing runs locally in your browser using JavaScript's native RegExp engine. No patterns or test data are transmitted to any server.
Process matched text with our Text Case Converter. Validate data formats with our JSON Validator.
No. Enter the pattern without delimiters. For example, enter \\d+ instead of /\\d+/g. Use the flag toggles to set flags.
Global (g) finds all matches. Case-insensitive (i) ignores case. Multiline (m) makes ^ and $ match line boundaries. Dotall (s) makes . match newlines.
Yes. Each match displays its capture groups (if any) with group indices and values.
Yes. The tool stops after 1,000 matches to prevent infinite loops with patterns that match empty strings.
Yes. All regex testing runs in your browser. No data is sent to any server.
Browse all free tools · Guides and tutorials · PDF tools · Developer tools · Text tools · SEO tools