Regex Tester

Local Processing

Write and test regular expressions in real-time, inspect match capturing groups, replace text, and review patterns locally. Test regular expressions in real-time, debug capturing groups, replace text values, and reference cheat sheets offline.

๐Ÿท๏ธ Version: 1.0.0๐Ÿ“… Updated: 22 July 2026โœ“ Runs entirely in your browserโœ“ No uploadsโœ“ Privacy First

๐Ÿงช Regular Expression

//gi

Active Modifiers (Flags)

๐Ÿ” Expression Breakdown

\bAsserts a word boundary position (transition between word characters and non-word characters).
.Matches any single character except line terminators (unless the 's' flag is checked).
+Quantifier: Matches 1 or more of the preceding token (greedy).
[...]Character class (Set): Matches any single character contained within the square brackets.
{n,m}Interval quantifier: Matches the preceding token between 'n' and 'm' times.

๐Ÿ“ Test Editor Panel

Welcome to Developer Hut! Contact us at support@developerhut.tools or reach the admin directly at admin.accounts@developerhut.in. Note that invalid email structures like test@com or info@domain.c will not match the standard email regex expression.
Matches: 0Benchmark Time: 0 ms

๐Ÿ’ก Common Regex Operator Cheat Sheet

Use this interactive reference table to review basic quantifiers and operators commonly used in JS regular expressions.

PatternOperator MeaningExample and Matches
.Matches any single character except newlinea.c matches "abc", "a1c", "a-c"
\dDigit (0-9)\d{3} matches "123", "909", but not "abc"
\wWord character (alphanumeric + _)\w+ matches "username_123", "hello"
\sWhitespace character (space/tab/newline)a\sb matches "a b" with space
^Assert start of line boundary^abc matches "abc" at start of text line
$Assert end of line boundaryxyz$ matches "xyz" at end of text line
+Quantifier: One or more (greedy)\d+ matches "5", "555", "90021"
*Quantifier: Zero or more (greedy)a*b matches "b", "ab", "aaaab"
?Quantifier: Optional (Zero or one)colou?r matches both "color" and "colour"
\bWord boundary position\bcat\b matches "cat", not "category"

๐Ÿ”’ Privacy Notice: All regular expression evaluations, highlighting, and replacement routines are performed locally inside your web browser sandbox. No test text or pattern strings are ever uploaded or transmitted to external servers.

Frequently Asked Questions

๐Ÿค” What does the 'DotAll (s)' modifier do?โ–ผ

By default, the wild card dot (.) matches any character except line breaks (such as \n or \r). Checking the dotAll (s) modifier changes this behavior, forcing the dot operator to match all characters including line breaks.

โš ๏ธ What is the difference between global (g) and sticky (y) flags?โ–ผ

The global (g) flag matches all occurrences of the pattern throughout the entire text input. The sticky (y) flag, introduced in ES6, matches only starting from the exact position indicated by RegExp.lastIndex in the target string, and does not perform a search forward.

๐Ÿ“š How do capturing group backreferences work in Replace Mode?โ–ผ

When your pattern contains capturing parentheses (...), they are indexed from left to right. In your replacement string, you can reference the matched content of these groups using $1 for Group 1, $2 for Group 2, etc. Use $& to reference the entire matched substring.