Regex Tester
Test patterns, explore matches, and debug expressions.
Regular expression
JavaScriptTest string
Highlighted matches
…Contact support@example.com or dev@local.test.
Matching…
Regex quick reference
^ / $ start / end · \\d digit · \\w word character · + one or more · (…) capture · (?<name>…) named capture.
Explore JavaScript regular expressions
Choose an example or enter a pattern without slash delimiters. Toggle flags, edit the test string, and expand match details to inspect captures and offsets.
Practical example
Select Dates to capture year, month, and day separately. Enable Replace mode and try $<day>/$<month>/$<year> to rearrange a matched date.
Moving a pattern between JavaScript and Python
In this JavaScript regex tester, (?<year>[0-9]{4}) captures a four-digit
year. In a Python regex tester using the standard re module, write (?P<year>[0-9]{4}). Run both patterns against the same dates and compare
the named captures before reusing the expression.
Frequently asked questions
How are match positions counted?
Indices are zero-based UTF-16 code-unit offsets. Each interval includes its start and excludes its end. Enable d to inspect capture indices.
Why did matching time out?
Some patterns require excessive backtracking. DevDesk terminates the worker after its time budget so the page stays responsive. Shorten the text or simplify nested repetition.