TL
Tool Lab
💰捐贈
💰捐贈

Regex Tester

Test and debug regular expressions with live match highlighting. Supports all JavaScript regex flags.

Regular Expression
//gm
Test String
Matches

How to Use the Regex Tester

Type a regular expression pattern in the top input field. Matches are highlighted in blue in the test string panel as you type. Toggle flags with the buttons below the pattern field: g (global), i (case insensitive), m(multiline), and s (dot-all).

Switch to Replace mode to test substitutions. Use $1,$2, etc. in the replacement string to reference capture groups.

Regular Expression Basics

Regular expressions (regex) are patterns for matching text. Common constructs: \d matches digits, \w matches word characters,. matches any character (except newline without s flag),^ and $ match line start/end with m flag,() creates a capture group, and | is OR.