Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Regex Tool Online

Regex tool online for JavaScript RegExp: test, find matches, replace text, and split strings with flags (g i m s u y). Runs locally in your browser.

Flags:
Tip: You can paste /pattern/flags in the pattern box; flags will auto-sync.
Privacy: runs locally in your browser. No uploads, no tracking scripts.

How to use

Enter your pattern and input text, then choose what you want to do.

  1. Type a pattern (either \d+ or /\d+/g) and pick flags.
  2. Select an action: Test, Match, Replace, or Split.
  3. Click Run to see the result JSON (or an error if the regex is invalid).

FAQ

Does this regex tool run server-side?

No—your pattern and text are processed locally in your browser (no network calls).

What regex flavor does this use?

It uses JavaScript RegExp (same behavior you get in modern browsers and Node.js).

Can I paste /pattern/flags directly?

Yes. If you paste something like /\d+/g, the tool will parse it and sync the flag checkboxes.

Why do I only see the first match sometimes?

Without the g flag, JavaScript returns only the first match; enable g to list all matches.

How do I reference capture groups in Replace?

Use JavaScript replacement syntax like $1, $2, or $& (whole match).

What does the Split limit do?

It limits the number of parts returned by split; leave it empty for no limit.

Why is my pattern showing “Invalid RegExp”?

The pattern or flags are not valid for JavaScript; remove unsupported flags or fix escaping (e.g., use \\ inside character escapes).

Continue your workflow

Browse related tools by task. Use the improved core tools for a consistent workspace with file import, downloads and clear validation errors.

JavaScript regex test · capture groups and indices · replace preview

Additional controls for this task, preserved from the original implementation. Inputs stay inside this mode.

JS matches · named groups · replacement

Additional controls for this task, preserved from the original implementation. Inputs stay inside this mode.

JS flags · match locations and groups · replacement preview

Additional controls for this task, preserved from the original implementation. Inputs stay inside this mode.

test/match/replace/split · match context · result limits

Additional controls for this task, preserved from the original implementation. Inputs stay inside this mode.