Regex Tester — free
Test and debug regular expressions online. Highlight matches, test flags, and view capture groups.
How to use Regex Tester
Enter Your Regular Expression
Click the 'Pattern' input field at the top of the editor. Type or paste your regex pattern (e.g., ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$). The pattern box accepts all standard regex syntax including anchors, character classes, and quantifiers.
Input Text to Test Against
Click the 'Test String' textarea below the pattern field. Paste or type the text you want to match against your regex. You can test multiple lines by pressing Enter. The tool will immediately process and display results in real-time.
Select Regex Flags
Check the flag checkboxes on the right side: 'g' (global - find all matches), 'i' (case-insensitive), 'm' (multiline), 's' (dotall), 'u' (unicode). Selected flags will modify how your pattern matches. The interface shows which flags are currently active in green.
Review Highlighted Matches
View the test string area where all matches are highlighted in yellow or blue. Each match is numbered sequentially. Hover over highlighted text to see the exact character position and matched content in the tooltip.
Examine Capture Groups
Scroll to the 'Capture Groups' panel below the text area. This table shows all matched groups with their content, position, and length. Each row represents one captured group (Group 0 is the full match, Group 1+ are parenthesized subexpressions).
Check Match Count and Details
View the 'Results' summary box showing total matches found, execution time, and any regex errors. If your pattern has syntax errors, the error message appears in red text explaining the issue and line number.
Frequently Asked Questions
Related Tools
JSON Formatter
Format, validate, and minify JSON data online. Syntax highlighting, error detection, and tree view.
URL Encoder / Decoder
Encode and decode URLs and query strings. Escape special characters for safe URL usage.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-512 hashes from text or files. Browser-based, private.