No Login Data Private Local Save

RegEx Tester - Online Regular Expression Builder & Matcher

21
0
0
0

Online Regex Tester

Build, test, and debug regular expressions in real-time. Supports JavaScript regex flavor with all common flags.

Pattern & Flags
/ /
Write pattern without delimiters. Use inline flags or the input above.
Use $1, $2, etc. for captured groups.
Matches & Info
  • No matches yet.

Frequently Asked Questions

A regular expression is a sequence of characters that defines a search pattern. It is commonly used for string searching, validation, and manipulation in programming and text editing.

Enter your pattern in the pattern field (without leading/trailing slashes), choose flags via checkboxes or the flags text input, then type or paste your test string. Matches will be highlighted and listed in real time. You can also test replacements using the replacement input.

This tester supports the standard JavaScript regex flags: g (global), i (case-insensitive), m (multiline), s (dotall - dot matches newline), u (unicode). You can combine them, e.g., gi.

Common issues: forgetting the global flag for multiple matches, incorrect escaping (e.g., special characters like \\d need double backslash in some contexts), or mismatched parentheses. Check the error message displayed if the pattern is invalid.

Use \\d for any digit (0-9), \\w for word characters (letters, digits, underscore), \\s for whitespace, and their uppercase counterparts for negation: \\D, \\W, \\S.

Capturing groups are created with parentheses (...). The matched content can be referenced by $1, $2 etc. in the replacement string. For example, pattern (\\w+)\\s+(\\d+) with replacement $1-$2 will turn "hello 123" into "hello-123".