Skip to content

Install ALink Tools

Free browser tools for images, PDFs, media, text and web checks. Most tools process files locally on your device.

  1. Tap the Share button in the Safari toolbar.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. ALink Tools then opens from your Home Screen like an app.

Regex Tester

Try a regular expression against sample text, with JavaScript’s own RegExp engine. See match positions, capture groups and a replacement preview. This is not PCRE, .NET or Python regex.

Runs in your browserJavaScript RegExpRuns in your browser
1

Pattern, flags and test text

Flags

Limits

  • The input is limited to 2 MB of UTF-8 text (8 MB if you load a file). Larger files can run out of memory in a phone browser tab.
  • The engine is JavaScript RegExp, not PCRE, POSIX, .NET or Python.
  • At most 10,000 matches are listed. Very slow patterns may freeze this tab; there is no separate timeout worker.
  • Flags are g, i, m, s, u, v and y only. u and v cannot be combined.
  • Replacement uses JavaScript rules ($1, $&, $`, $’). It does not use Perl’s /e or similar.
2

Matches and replacement

How to use Regex Tester

  1. Write the patternEnter a JavaScript regular expression and the flags you need (g, i, m, s, u, v, y).
  2. Paste the test textMatches are highlighted and listed with their groups.
  3. Optional replacePreview a replacement string. $1 and $& work as in JavaScript.

JavaScript regex only

The pattern is compiled with new RegExp and run in this tab. Syntax, flags and Unicode handling are exactly what your browser implements. Look-behind, named groups and the v flag depend on the browser.

PCRE features such as possessive quantifiers, recursion, or (?i) inline flags are not supported. A badly written pattern can be slow (catastrophic backtracking). Keep the test text within the size limit and avoid heavily nested quantifiers on large inputs.

Frequently asked questions

Is my text or file uploaded?

No. Everything runs in your browser tab with JavaScript. Nothing you type, paste or drop is sent to a server, logged or stored by ALink Tools.

Why does this not match what regex101 or a server shows?

Those tools often default to PCRE or another flavor. This page is deliberately JavaScript-only, which is what your front-end code will do.

Do I need slashes around the pattern?

No. Type the pattern only, and set flags in the flag boxes. Slashes would be treated as literal characters.

Can a regex lock up my browser?

A pathological pattern on a long string can. Stay within the 2 MB limit and test incrementally if a pattern uses nested repetition such as (a+)+.

Related tools

All tools