💻

Regex Tester

内容在当前浏览器处理,最多 256 KB。密码和签名密钥不会发送到服务器或保存。

How to use this tool

Use the browser JavaScript regular-expression engine to inspect matched text, positions and capture groups while debugging extraction rules.

  1. Enter a pattern and a sample test string.
  2. Choose flags such as g, i, m, s or u and inspect the matches.
  3. Test both matching and non-matching inputs before using the pattern in a program.

Example input

Pattern: (\d+)
Flags: g
Text: Order 12 and 34
Matches: 12, 34

Checking results and limitations

Enter the pattern itself, without the surrounding slashes and trailing flags in /pattern/g notation. JavaScript syntax differs from Java and PCRE. Complex backtracking expressions can slow the browser.