🧪 Regular Expression Tester

Test regular expressions with real-time match highlighting, capture group extraction, and a library of tested regex patterns for emails, URLs, dates, and phones.

/ /
Matches: 0

Match Details

# Match Index Length Groups

Regex Flag Cheatsheet

  • g (global): Find all matches rather than stopping after the first occurrence.
  • i (ignore case): Case-insensitive matching (e.g. /a/i matches "A" and "a").
  • m (multiline): Treats beginning (^) and end ($) characters as working across each line.
  • s (dotAll): Allows the dot (.) to match newline characters.

How to use Regex Tester

Enter a JavaScript regular expression, select flags and paste example text. Inspect the highlighted matches and captured groups.

What to check before using the result

JavaScript expressions may behave differently in other engines. Certain patterns can freeze a tab on long input.

Example: Finding a sequence of digits

Use the pattern \d+ with the global flag on the text Order 42, batch 7 to find 42 and 7. Parentheses capture groups; flags affect matching. Results follow JavaScript regex semantics, which can differ from other languages.

Free to use; no account required. For browser requirements and processing limits, read the ToolsHub FAQ. See how local processing works in our privacy policy.