Workspace DevDesk / Regex Tester
Testing

Regex Tester

Test patterns, explore matches, and debug expressions.

Regular expression

JavaScript

Test string

Highlighted matches

…
Contact [email protected] or [email protected].

Matching…

Regex quick reference

^ / $ start / end · \\d digit · \\w word character · + one or more · (…) capture · (?<name>…) named capture.

Your data never leaves your browser. Ctrl / ⌘ + K to switch tools

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.

Related tools

Search developer tools

All tools

JSON Formatter Formatters
JWT Decoder Encoding & decoding
Regex Tester Testing
Base64 Converter Encoding & decoding
UUID Generator Generators
Timestamp Converter Converters
JSON to CSV Formatters
↑ ↓ Navigate ↵ Open tool