டெவலப்பர் கருவிகள்
Regex சோதனை
உங்கள் உரையில் ரெகுலர் எக்ஸ்பிரஷனைச் சோதிக்கவும்: தட்டச்சு செய்யும்போதே ஒவ்வொரு பொருத்தமும் குறிக்கப்படும், குழுக்கள், எளிய விளக்கம், தேடி மாற்றுதலுடன்.
What is a regular expression?
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.
What you can do with the Regex Tester
- Live highlights: Every match marked as you type.
- எளிய விளக்கம்: The pattern in plain English.
- Safe: Stops patterns that would freeze the page.
How to use the tester
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.
The flags
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.
Patterns that freeze
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.
A small cheat sheet
\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.
Ready patterns for India
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}$.
Related tools
நிஜ வாழ்க்கை உதாரணங்கள்
Find Indian mobile numbers
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.
Clean a list before sending
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.
Understand a pattern from old code
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.
Frequently Asked Questions
Which regex flavour does this use?
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.
How do I match a full stop or a bracket?
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.
What is the regex for an Indian mobile number?
^[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.
Why does my pattern match only the first result?
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.
Is what I paste sent anywhere?
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.
Is the Regex Tester free?
Yes. There is no sign-up, no limit and nothing to install. It also works offline once the page has loaded.
What is the regex for an email address?
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.
What is the regex for a PAN number?
^[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.
What do the brackets ( ) do?
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.
Can I test a regex for Excel or Google Sheets?
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.
More developer tools
- HTML எண்டிட்டி குறியாக்கி & குறிவிலக்கி: Escape < > & and quotes into HTML entities so they display as text, or unescape entities back to characters.
- உரை வேறுபாடு சரிபார்ப்பி: Compare two versions of a text line by line or word by word, see what was added or removed, and how similar they are.
- JSON வடிவமைப்பி & சரிபார்ப்பி: Format, validate and minify JSON, spot syntax errors and turn messy JSON into readable, indented text or a compact single line.
- UUID ஜெனரேட்டர்: Generate random version-4 UUIDs (GUIDs) for databases, APIs and software development.
- நிற வடிவ மாற்றி: Convert colours between HEX, RGB and HSL formats in either direction, with a live colour preview.
- எண் அடிமான மாற்றி: Convert numbers between binary, octal, decimal and hexadecimal, or to any base up to 36, with a bit view.