Skip to tool
Text

RegExp Tester

Test JavaScript regular expressions with groups, indices, and replacement output.

Web Worker Local onlyTools
Input0 characters
Reference0 characters
Result0 characters
Ready

JavaScript engine tape trace · flavor declared

A match is a span, state, and engine decision.

Patterns do not have one universal meaning. This bench follows the running browser’s ECMAScript RegExp semantics and reports indices, captures, flags, and replacement behavior as execution evidence.

JS

ONLY

PATTERN/(?<proto>https?):\/\/(?<host>[^/:\s]+)(?::(?<port>\d+))?/dguINPUTVisit https://example.com:8080/docs next.
0V
1i
2s
3i
4t
5·
6h
7t
8t
9p
10s
11:
12/
13/
14e
15x
16a
17m
18p
19l
20e
21.
22c
23o
24m
25:
268
270
288
290
30/
31d
32o
33c
34s
MATCH 0 · [6, 35)proto · [6, 11)host · [14, 25)port · [26, 30)

Flag state machine

Flags change meaning and iteration—not decoration.

d

Indices

Adds start/end spans for the match and captures

g

Global

Repeats and mutates lastIndex

i

Ignore case

Uses the engine’s case-folding rules

m

Multiline

^ and $ also see line boundaries

s

Dot all

. can include line terminators

u

Unicode

Code-point-aware parsing and escapes

v

Unicode sets

Set operations and string properties

y

Sticky

Must match exactly at lastIndex

Capture ledger

Unmatched is different from an empty match.

0 · full[6, 35)https://example.com:8080/docsparticipated
1 · proto[6, 11)httpsparticipated
2 · host[14, 25)example.comparticipated
3 · port[26, 30)8080participated
4 · optionalundefinedunmatched

Native replacement proof

The template has its own language.

ORIGINALVisit https://example.com:8080/docs next.
TEMPLATE$<proto>://$<host>$<path>
RESULTVisit https://example.com next.
$& · full match$1 … $99 · numbered capture$<name> · named capture$$ · literal dollar$` / $' · prefix / suffix

Backtracking isolation chamber

Responsive UI is not proof of a safe pattern.

/^(a+)+$/aaaaaaaaaaaaaaaaaaaaaaaaaaaa!

A run owns a dedicated Worker. Starting another run terminates the previous one, so the main page can keep responding. Production safety still depends on input distribution, engine, pattern structure, and resource policy.

Direct answer

What is RegExp Tester?

Test a regular expression with the browser’s real JavaScript engine, inspect match spans and captures, preview replacement tokens, and isolate runaway work in a replaceable Worker.

What can it do?

  • Match
  • Replace

How to use RegExp Tester

  1. 01

    Choose a task

    Select Match and Replace in the workspace.

  2. 02

    Provide the input

    Enter a regular expression. The input stays in the browser processing path.

  3. 03

    Review the result

    Run the tool, inspect its result and diagnostics, then copy or download the output when the page offers that action.

Frequently asked questions

What is RegExp Tester?
Test a regular expression with the browser’s real JavaScript engine, inspect match spans and captures, preview replacement tokens, and isolate runaway work in a replaceable Worker.
What can RegExp Tester do?
RegExp Tester supports Match and Replace. Each mode is available directly in the page workspace.
Does RegExp Tester upload my data?
RegExp Tester processes your input locally in the browser. DevSexy does not add an upload, account, or server-processing step to this workflow.
DevSexy processes tool input locally. No paste tracking, accounts, or upload step.