Developer Tools

Utilities lainnya

Regular Expression Tester

Test regex patterns against sample text live.

//g
Test text
2 matches
Contact: ada@example.com and team@dev.example then invalid@x
#1 @ 9ada@example.com
$1ada
$2example.com
#2 @ 29team@dev.example
$1team
$2dev.example

Guide & explanation

The Regular Expression Tester runs a JavaScript RegExp pattern against sample text live, with match highlighting and group details.

Flags

FlagMeaning
gglobal — every match, not just the first
iignore case
m^ and $ match at each line
s. also matches newlines
uUnicode mode
ysticky — match exactly at lastIndex

Example

pattern: (\w+)@(\w+\.\w+)
text   : contact ada@example.com
match  : ada@example.com   group 1: ada   group 2: example.com

Reading the results

  • The match count and highlights on the test text.
  • Each match shows its index, numbered groups ($1, $2), and named groups (?<name>).
  • An invalid pattern shows the error message from the RegExp engine.