Regex Tester – Test Regular Expressions with Live Highlighting
Calcon's free Regex Tester lets you write and test JavaScript regular expressions with real-time match highlighting. See every match position, named group values, and use quick-reference chips for common patterns — all without leaving the page.
Regex Flag Reference
| Flag | Name | Effect |
|---|---|---|
| g | Global | Find all matches, not just the first |
| i | Ignore case | Match upper and lowercase equally |
| m | Multiline | ^ and $ match start/end of each line |
| s | Dot all | . matches newline characters too |
Frequently Asked Questions
What is a regular expression?
A regular expression (regex) is a pattern that describes a set of strings. For example, \d{3}-\d{4} matches phone formats like 555-1234. Regex is supported in JavaScript, Python, Java, and nearly every programming language and text editor.
What do the g, i, m, s flags do?
g (global) finds all matches instead of stopping at the first. i makes matching case-insensitive. m makes ^ and $ match line boundaries. s (dotAll) lets . match newline characters.
What are named capture groups?
Named groups use (?<name>...) syntax. For example, (?<year>\d{4})-(?<month>\d{2}) captures date parts by name. Named groups appear in the groups table below the match list and make your regex easier to read and maintain.
How do I escape special characters?
Special regex characters (. * + ? ^ $ { } [ ] | ( ) \) must be escaped with a backslash to match them literally. For example, to match a period: \. To match a dollar sign: \$. To match a backslash itself: \\.
Related Developer Tools
CSS Minifier
Minify CSS code instantly in browser.
HTML Viewer
Preview HTML code in real-time.
HTML Table Generator
Create HTML tables in seconds.
JSON Formatter
Format, validate, and minify JSON instantly.
Base64 Encoder / Decoder
Encode and decode Base64 instantly.
URL Encoder / Decoder
Encode, decode, and parse URLs instantly.
MD5 Hash Generator
Generate MD5, SHA-1, SHA-256 hashes instantly.
Color Palette Generator
Create harmonious color palettes from any color.
HEX to RGBA Converter
Convert HEX colors to RGB/RGBA instantly.
PX to REM Converter
Convert PX to REM instantly.
