Free calculators, PDF, photo and audio tools.
Or pick a job
New tools, new guides and money tips by email. No spam, and you can leave any time.
Free. We never share your email.
Developer Tools
Regex Tester
Test a regular expression on your own text: every match is marked as you type, with groups, a plain-English explanation and find-and-replace.
A regular expression (regex) is a small pattern that describes text. \d means a digit, + means one or more, [A-Z] means a capital letter, ^ and $ mean the start and end. So ^[6-9]\d{9}$ means a 10-digit number starting with 6, 7, 8 or 9: an Indian mobile number. Regex is used in form validation, search and replace in code editors, Excel and Google Sheets (REGEXMATCH), log searching, and data cleaning in Python and JavaScript.
Type a pattern in the box between the slashes, or tap a ready pattern like Email, Indian mobile or PAN. Paste your text below. Matches are marked as you type, and the count shows at the top. Open Matches and groups to see each match and what every bracket captured. Open What the pattern means for an explanation, and Find and replace to try a replacement with $1 for the first group.
g finds all matches instead of only the first. i ignores upper and lower case. m makes ^ and $ match at the start and end of every line, not only of the whole text. s lets the dot match new lines too. u turns on full Unicode, needed for emoji and for \p{…} classes like \p{L} for any letter in any language, including Hindi and Telugu.
Some patterns, like (a+)+$ or (.*)*x, can take billions of steps on text that almost matches. This is called catastrophic backtracking, and in a real app it can slow down or crash a server. The tester runs your pattern in the background and stops it after 2 seconds, then tells you. Fix it by removing nested repeats, making groups more specific, or using possessive-style rewrites.
\d digit, \w letter or digit or _, \s space, . any character, [abc] one of a, b or c, [^abc] anything but those, ^ start, $ end, * 0 or more, + 1 or more, ? optional, {3} exactly 3, {2,5} 2 to 5, ( ) group, | or, \b word boundary. Add ? after *, + or {…} to match as little as possible.
Mobile: ^[6-9]\d{9}$. PIN code: ^[1-9]\d{5}$. PAN: ^[A-Z]{5}\d{4}[A-Z]$. GSTIN: ^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$. IFSC: ^[A-Z]{4}0[A-Z0-9]{6}$. Vehicle number (most states): ^[A-Z]{2}\d{1,2}[A-Z]{1,3}\d{4}$. Aadhaar (format only): ^[2-9]\d{11}$.
Use the pattern [6-9]\d{9} with the g flag on a block of text. In "Call 9876543210 or 12345 or 8123456789" it finds two numbers and skips 12345. Each match is listed with its position.
Put \s+ as the pattern and a single space as the replacement. Every run of spaces, tabs and line breaks becomes one space, and the result is ready to copy.
Paste a pattern you found in a project. The Explain box goes through it piece by piece, like "one digit" or "one or more times", so you can tell what it really allows before you change it.
JavaScript (ECMAScript), the same as Chrome, Node.js, TypeScript and most web forms. Most simple patterns work the same in Python, Java, PHP, C# and Go. Differences are mostly in look-behind support, named group syntax (Python also accepts (?P<name>…)), and Unicode classes.
Put a backslash before it: \. matches a full stop, \( a bracket, \? a question mark and \\ a backslash. Without the backslash, . means any character, which is a common cause of patterns matching too much.
^[6-9]\d{9}$ checks a plain 10-digit number. To allow +91 or 0 in front and a space or dash, use ^(?:\+91[\s-]?|0)?[6-9]\d{9}$. Remove the ^ and $ to find numbers inside longer text, and add the g flag to find all of them.
Turn on the g (global) flag. Without it, a JavaScript regex stops after the first match. In code, use text.match(/…/g) or text.matchAll(/…/g) to get every match, and text.replace(/…/g, …) to replace all of them.
No. Your pattern and text stay on your device. Everything runs in your browser on your own phone or computer, and nothing is sent to our servers or saved.
Yes. There is no sign-up, no limit and nothing to install. It also works offline once the page has loaded.
A practical one is [\w.+-]+@[\w-]+(\.[\w-]+)+ with the i flag. No simple pattern matches every valid email exactly; for sign-up forms, check for one @ and a dot after it, then send a confirmation email.
^[A-Z]{5}[0-9]{4}[A-Z]$: five capital letters, four digits and one capital letter, like ABCPR1234K. The fourth letter shows the type of holder: P for a person, C for a company, H for a HUF and F for a firm.
They make a group: the text matched inside is captured, so you can use it in a replacement as $1, $2 and so on. Use (?: … ) for a group that is not captured, and (?<name> … ) to give the group a name.
Google Sheets REGEXMATCH, REGEXEXTRACT and REGEXREPLACE use a very similar syntax (RE2), so most patterns tested here work there. RE2 does not support look-ahead, look-behind or back-references like \1. Excel 365 also has REGEXTEST, REGEXEXTRACT and REGEXREPLACE.
Free calculators, PDF, photo and audio tools.
New tools, new guides and money tips by email. No spam, and you can leave any time.
Free. We never share your email.
Every tool on Quick Work Studio, free and in your browser. Prefer reading first? See the guides or full directory.
Test a regular expression on your own text: every match is marked as you type, with groups, a plain-English explanation and find-and-replace.
Save favourites across visits.
Update the password for your account.
This permanently deletes your account, your saved favourites, your synced notes and tasks, and any feedback linked to it. It can't be undone. Every tool keeps working without an account.
Found a bug or want a new tool? Tell us. We read every message.
Prefer email? contact@quickworkstudio.com
Your feedback is on its way to us.
Open all 182 tools from your home screen, full screen, like an app.
Free, no app store, under 1 MB. Remove it any time like any other app.
It opens straight into this tool, full screen, like an app.
A few taps, under 30 seconds.
What kind of tool?
How often would you use it?
Sign in to keep your favourites, saved results and settings on all your devices.
New here? Create a free account
Forgot your password? Reset it by email
Your saved results (0)Every tool works without signing in. An account keeps your favourites, saved results, settings and Selnah chats on all your devices.
Open any saved answer again, or share it.
Takes 20 seconds. No card, no spam.
Already have one? Sign in
Enter the email you signed up with. We'll send you a link to set a new password.
Remembered it? Sign in
Choose a new password for your account. You'll be signed in, and signed out on your other devices.
Link not working? Get a new one
Your favouritesSee all
Recently used
Settings
Tools keep working without an account, and you can sign up again any time.
Appearance
Tools
Your data
Help & info
Legal
Quick Work Studio · version 2.99