Free online regular expression tester tool, supports real-time match highlight display, shows match results and group capture info, supports g/i/m flags, helps developers quickly write and debug regex
Enter regex and test text to instantly display match results
Matched content highlighted, easy to see match positions
Display match count and detailed info of each match
Support capture groups, display each group's match content
Support g(global), i(ignore case), m(multiline) etc. flags
All operations done locally in browser, protects data privacy
Enter the regex to test in regex input box, can also click flag buttons to quickly add g, i, m flags.
Enter text content to test in test text box, or click "Sample" button to load sample text for quick experience.
Tool will real-time highlight display matched content, show match count and detailed info, including each match's position and captured group content.
Validate email, phone, ID card etc. input formats
Find specific pattern content in large text
Extract needed data fragments from text
Batch replace content matching pattern in text
Clean and normalize text data format
URL route rule matching in Web frameworks
Regular Expression (Regex or RegExp) is a pattern used to match character combinations in strings. It uses a single string to describe and match a series of strings that conform to certain syntax rules, is a powerful tool for text processing and data validation.
. matches any character (except newline); * matches previous character 0 or more times; + matches previous character 1 or more times; ? matches previous character 0 or 1 time; ^ matches string start; $ matches string end; \d matches digit; \w matches letter digit underscore; \s matches whitespace character.
g (global): global match, find all matches; i (ignoreCase): ignore case; m (multiline): multiline mode, ^ and $ match each line's start and end; s (dotAll): make . match all characters including newline.