How to Test Regular Expressions
Test and debug JavaScript regex against sample text, with flags and live match results.
June 3, 2026
Regex Tester — free, no sign-up
Drag & drop · Instant download
How to Test a Regex
Step 1: Open the Regex Tester Go to the Kinsutools Regex Tester.
Step 2: Enter your pattern and flags Type the regular expression in the pattern field and add flags like g (global), i (case-insensitive), m (multiline) or u (unicode).
Step 3: Add sample text Paste the text you want to match against. Matches and their positions appear instantly.
Common Flags Explained
- g — find all matches, not just the first
- i — ignore upper/lower case
- m — treat each line as a separate start/end
- u — full unicode support
Tips
- It uses JavaScript regex, the same engine as browsers and Node.js.
- If your pattern is invalid, you'll see the error message instead of matches.
- Escape special characters like . * + ? ( ) [ ] when you want them matched literally.
Related Guides
Keep reading
How to Convert Kruti Dev to Unicode (Hindi Mangal)
Kruti Dev is a legacy ASCII font, so its Hindi text breaks when shared. Here's how to convert Kruti Dev to Unicode (Mangal) for free, in both directions.
Read more Text ToolsHow to Convert Preeti to Unicode (Step-by-Step)
Preeti text turns to gibberish when you share it because Preeti is an ASCII font, not Unicode. Here's how to convert Preeti to Unicode Nepali for free in seconds.
Read more Text ToolsHow to Remove Duplicate Lines from Text
Clean up lists and text by removing repeated lines while keeping the first of each.
Read more