TR ToolRivet

Developer Tools

Regex Tester

Test JavaScript regular expressions against sample text directly in your browser.

Use this tool to validate a regex pattern, inspect matches, review capture groups, and highlight matched text without sending your sample text to a server.

Regex Tester

Test JavaScript regular expressions against sample text locally.

Flags

Results

// Match details will appear here.
// Highlighted matches will appear here.

How to use

  1. 1. Enter a pattern

    Type a JavaScript regular expression pattern without surrounding slashes.

  2. 2. Choose flags

    Enable common flags such as global, ignore case, multiline, or dotAll.

  3. 3. Review matches

    See match counts, positions, capture groups, and highlighted matches.

Example

The example pattern finds email-like strings and shows captured local and domain parts.

Pattern: ([\w.-]+)@([\w.-]+\.\w+)
Text: Contact [email protected] or [email protected]
Flags: g, i

FAQ

Does this use JavaScript regular expressions?

Yes, this tool tests regular expressions using the JavaScript RegExp engine.

Is my text uploaded to a server?

No, regex testing runs locally in your browser.

Can I use flags like g, i and m?

Yes, common JavaScript regex flags are supported.