Regex Tester
Test JavaScript regular expressions live — highlighted matches, capture groups and replace preview.
Result
How to use
- 1
Type your pattern and tick the flags you need.
- 2
Paste some test text — matches are highlighted as you type.
- 3
Check the capture groups table, and try a replacement.
Questions
Which regex flavour is this?
JavaScript (ECMAScript), as used in browsers and Node.js. Most syntax is shared with Python, Java and PCRE, but look-behind and named-group details can differ.
Why do I get only one match?
Without the g (global) flag a regex stops after the first match. Tick g to find all of them.
What does the s flag do?
It makes . also match line breaks. Without it, . matches any character except a new line.
About this Regex Tester tool
Regex Tester — Test JavaScript regular expressions live — highlighted matches, capture groups and replace preview. It is one of 200 free tools on namasivayam.in, made by software engineer Namasivayam Vadivelan for everyday use in India.
Everything is calculated instantly in your browser: nothing you type or upload is sent to any server, there is no sign-up, and it works on mobile and desktop. Type your pattern and tick the flags you need.
Related reading
Articles that go with this tool

How AI Chatbots Actually Work — Explained Simply, Without the Jargon
AI chatbots can write emails, explain code and plan trips. But how do they really work, why do they sometimes confidently get things wrong, and how should you use them wisely?

Passkeys Explained: The Simple, Safer Way to Log In Without Passwords
Google, Apple and Microsoft now let you sign in with passkeys instead of passwords. What a passkey is, why it can’t be phished, and how to set one up in five minutes.

Public Wi-Fi Safety: 8 Rules Before You Connect at Airports, Cafés and Hotels
Free Wi-Fi is convenient, but it can expose your data to strangers on the same network. Eight simple rules to stay safe on airport, café, railway and hotel Wi-Fi.
Related tools
More developer tools you may like
Results are estimates to help you plan. They are not financial, tax or medical advice.