# Test regular expressions

> Type a pattern and flags, paste sample text, and see matches highlighted live with the full match list and capture groups.

Open the tool: https://yourbrowsercandoit.com/regex-tester

Test regular expressions with live highlighting. Free, no signup. Runs entirely in your browser; files are never uploaded.

## How it works

Pattern field for the regex body, flags field for the modifiers (g for global, i for case-insensitive, m for multi-line, s for dotall, u for Unicode, y for sticky). Test text area for the input you want to match against. The tool compiles the regex with new RegExp, runs it against your text, and highlights every match. With the g flag, all matches are shown; without it, only the first. The match list below shows each match with its index in the text and any capture groups (numbered, unnamed groups). Invalid regex shows the parse error inline. This is JavaScript regex flavour, not Perl or .NET, so PCRE-only features (recursion, conditionals) aren't supported. Lookahead and lookbehind work in modern browsers.

## How to use it

1. **Type your pattern and flags.** Enter the regex body and modifiers like g, i, m, s, u, or y.
2. **Paste your test text.** Every match highlights live; invalid patterns show the parse error inline.
3. **Inspect the matches.** The list below shows each match with its index and every capture group's value.

## Frequently asked questions

### What regex flavour is this?

JavaScript / ECMAScript. Modern features (lookbehind, named groups, Unicode property escapes with u flag) work. PCRE-only features (recursion, conditionals) don't.

### How do I match across multiple lines?

Add the m flag to make ^ and $ match line boundaries. Add the s flag to make . match newlines.

### Can I see capture groups?

Yes. The match list shows each capture group's value for every match.

### Is my text uploaded?

No. Regex compiles and runs in your browser.

## Related tools

- [JSON to CSV](https://yourbrowsercandoit.com/json-to-csv): Turn JSON into a CSV table, nested fields and all.
- [CSV to JSON](https://yourbrowsercandoit.com/csv-to-json): Convert CSV to a JSON array, with live preview.
- [Password generator](https://yourbrowsercandoit.com/password-generator): Generate strong random passwords with crypto entropy.
- [Password strength](https://yourbrowsercandoit.com/password-checker): Check password strength with zxcvbn-style heuristics.
- [JSON formatter](https://yourbrowsercandoit.com/json-formatter): Format, validate and fix JSON, with a tree view.
- [URL encoder](https://yourbrowsercandoit.com/url-encoder): Encode or decode URLs and query parameters.
