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 sequence of characters that defines a search pattern. It is used to find, match, and replace text. For example, the pattern \d{3}-\d{4} matches phone number formats like 555-1234. Regex is supported in JavaScript, Python, Java, and almost every programming language.
What do the g, i, m, and s flags do?
g (global): find all matches, not just the first. i (case-insensitive): match uppercase and lowercase equally. m (multiline): makes ^ and $ match the start/end of each line, not just the string. s (dotAll): makes the . character match newlines as well as regular characters.
What are named capture groups in regex?
Named capture groups let you label parts of a match using the syntax (?<name>...). For example, (?<year>\d{4})-(?<month>\d{2}) would capture the year and month from a date string as named properties. Named groups make your regex more readable and allow accessing match parts by name rather than by index.
How do I escape special characters in a regex?
Special characters in regex (. * + ? ^ $ { } [ ] | ( ) \) must be escaped with a backslash if you want to match them literally. For example, to match a period, use \. (not just .) because . in regex means "any character". To match a dollar sign, use \$.
Related Developer Tools
Base64 Encoder / Decoder
Encode and decode Base64 instantly.
Bcrypt Hash Generator
Generate and verify bcrypt hashes in your browser.
Border Radius Generator
Generate CSS border-radius visually with live preview.
Box Shadow Generator
Generate CSS box shadows visually with live preview.
Color Palette Generator
Create harmonious color palettes from any color.
Color Picker
Pick colors and get HEX, RGB, HSL, CMYK instantly.
CSS Formatter / Beautifier
Format and beautify CSS code instantly.
CSS Gradient Generator
Generate linear, radial, and conic CSS gradients visually.
CSS Minifier
Minify CSS code instantly in browser.
CSS to SCSS Converter
Convert flat CSS to idiomatic nested SCSS instantly.




