Text & code / LING.TOOLS

Regex tester

Test JavaScript regular expressions, inspect matches and capture groups, and preview replacement text with timeout protection.

Input & settings

01
Configure tool input

JavaScript replacement syntax supports $&, $1, and $<name>.

Processed in your browser. Your input is never uploaded or saved.

Result

02

Ready when you are

Set up your input and run the tool. Your result will appear right here.

Private · Instant · Local

GUIDE & CONTEXT

About this tool

Explore the JavaScript RegExp dialect against sample text before putting a pattern into application code. Flags control global matching, case sensitivity, multiline anchors and other behavior. Patterns run in a separate worker with a time limit because backtracking-heavy expressions can otherwise block interaction.

How to use it

  1. Enter the pattern without surrounding slashes and select JavaScript flags.
  2. Paste sample text and optionally a replacement expression.
  3. Run the test to inspect matches, captured groups and replacement output; simplify the pattern if it exceeds the time limit.
Example

Pattern (\w+)@(\w+\.\w+) with flag g captures the user and domain in hello@example.com.

↑ ↓ navigate · Enter openEsc close