Skip to content
ToolUlkaa Tool
All tools

Text

Rich Text EditorWord CounterCharacter CounterText ReplacementText Case ConverterSpell CheckerArgument CompilerText to Base64Morse Code ConverterURL Encoder / DecoderJSON FormatterHash GeneratorRegex Tester

Categories

AcademicTextMathematicsStatisticsMachine LearningAIData ScienceFile
All tools
Text

Regex Tester

Type a pattern and some text, and see every match, group and replacement as you type.

Try:
Mode

Matches

2 matches

Write to [email protected] or [email protected].
Not emails: ada@, @example.com, plain text.

Match details

#MatchPosition
1[email protected]9 to 24
2[email protected]28 to 54

What the pattern means

  1. \ba word boundary (between a word character and a non-word character)
  2. [\w.%+-]any one of: a word character (letter, digit or underscore), ".", "%", "+", "-"
  3. +the previous item, one or more times, as many as possible (greedy)
  4. @the text "@"
  5. [A-Za-z0-9.-]any one of: A to Z, a to z, 0 to 9, ".", "-"
  6. +the previous item, one or more times, as many as possible (greedy)
  7. \.a literal "."
  8. [A-Za-z]any one of: A to Z, a to z
  9. {2,}the previous item, 2 or more times, as many as possible (greedy)
  10. \ba word boundary (between a word character and a non-word character)

This tester uses your browser's JavaScript regex engine. Other flavours (PCRE, Python, Java, .NET) differ in lookbehind, named group syntax and flags, so check there before reusing a pattern.

  1. Tools
  2. Text
  3. Regex Tester

About Regex Tester

This regex tester is free, needs no sign-up and runs in your browser, so the patterns and text you test are never uploaded. It uses the JavaScript regular expression engine of your own browser, so what matches here matches in JavaScript, TypeScript and Node.js code.

Matches are highlighted in the text, and a table lists each one with its position, its numbered capture groups and its named groups. Switch to replace mode to try a replacement with $1 for a numbered group and $<name> for a named one. Under the tester, the pattern is broken down token by token in plain English.

Matching runs in a Web Worker with a time limit. If a pattern backtracks catastrophically, for example nested repeats such as (a+)+ against a long run of a, the worker is stopped after a moment and you get a message instead of a frozen tab.

How to use Regex Tester

  1. 1Type or paste a regular expression into the pattern field, or pick one from the Try chips: email, URL, phone, date, IPv4 or hex colour.
  2. 2Toggle the flags you need: g for all matches, i to ignore case, m for multiline, s so the dot matches line breaks, u for Unicode and y for sticky.
  3. 3Paste your test text. Matches are highlighted as you type.
  4. 4Read the table under the tester for each match, its position, and its numbered and named groups.
  5. 5Switch to Replace to try a replacement string. Use $1, $2 and $<name> to reuse groups, then copy the result.
  6. 6Read "What the pattern means" to check the pattern does what you think.

Features

  • JavaScript regex flavour with flags g, i, m, s, u and y.
  • Live highlighted matches, with alternating colours so neighbouring matches stay distinct.
  • Numbered and named capture groups in a table.
  • Replace mode with $1, $<name> and $& in the replacement.
  • A plain-English explanation of every token, with groups indented.
  • A small pattern library with real test strings.
  • Catastrophic backtracking protection: matching runs in a Web Worker and is stopped after a short time limit.
  • Clear error messages for an invalid pattern.

The syntax in short

A regular expression is a pattern made of literal characters and a few special ones. These cover most everyday patterns.

.        any character except a line break
\d \w \s  digit, word character, whitespace (capitals negate)
[abc]    one of a, b or c      [^abc]  anything but those
* + ?    zero or more, one or more, optional
{2,5}    between 2 and 5 times
^ $      start and end (of each line with the m flag)
( )      capture group      (?: )  non-capturing
(?<n> )  named group        |      or
(?= )    lookahead          (?<= ) lookbehind

Worked examples

  • (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2}) on "Due 2026-10-02", replace with $<day>/$<month>/$<year> → gives Due 02/10/2026

    Each named group is captured once and the replacement puts them back in a different order.

  • ^\d{3}-[A-Z]+$ → gives ^ \d {3} - [A-Z] + $

    The explainer splits the pattern into these tokens: start of text, three digits, a hyphen, one or more capital letters, end of text.

Flags

FlagNameEffect
gglobalFind every match, not just the first
iignore caseLetters match in either case
mmultiline^ and $ match at each line break
sdot allThe dot also matches a line break
uunicodeTreat the pattern as code points and allow \p{...} properties
ystickyMatch only where the last match ended

Good to know

This is the JavaScript flavour

Regular expression syntax differs between languages. This tool runs your browser's JavaScript engine, so lookbehind, named groups and Unicode property escapes behave as in current JavaScript. PCRE, Python, Java and .NET have extras that JavaScript lacks (possessive quantifiers, atomic groups, inline flags) and some small differences, so test again in the target language before you rely on a pattern.

What catastrophic backtracking is

Some patterns take exponentially longer as the text grows, because the engine tries every way to split the text between nested repeats. (a+)+$ against "aaaaaaaaaaaaaaaaaaaaaaaa!" is the classic case. Here such a run is stopped after a short limit and reported. In your own code, avoid nested quantifiers over the same characters and be careful with patterns applied to user input.

Privacy: how it works

  • The pattern and the text are processed by code in this browser tab. Nothing is sent to Ulkaa or to any other server.

Tips

  • Escape the special characters . * + ? ( ) [ ] { } ^ $ | \ with a backslash when you mean them literally.
  • Prefer specific classes over the dot: [^"]* is faster and safer than .* when matching up to a quote.
  • Anchor a validation pattern with ^ and $, or it will match a valid piece inside invalid text.
  • Turn on the m flag when your text has several lines and you want ^ and $ per line.

Frequently asked questions

Is it really free?

Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.

Do I need an account?

No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.

Does it run in my browser?

Yes. Your pattern and text are processed by code running in your browser tab, on your own device.

Is my data uploaded?

No. Your pattern and text are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.

Which regex flavour does this use?

JavaScript, the engine built into your browser. It matches what JavaScript, TypeScript and Node.js code does. Other languages such as PCRE, Python, Java and .NET differ in places, so check there before reusing a pattern.

How do I use capture groups in a replacement?

Switch to Replace mode and write $1, $2 and so on for numbered groups or $<name> for named groups. $& inserts the whole match.

Why does my pattern only find one match?

Without the g flag a regular expression stops at the first match. Switch the g flag on to find all of them.

Why was my pattern stopped?

Matching ran longer than the time limit, which usually means catastrophic backtracking caused by nested repeats such as (a+)+. Rewrite the pattern so the same characters cannot be matched in several ways.

What are named groups?

A named group is written (?<name>...). Its text is available by name in code and in replacements as $<name>, which is easier to read than counting parentheses.

Can a regex fully validate an email address?

No. A pattern can check that text has the shape of an address, but the full email rules are very large and only sending a message proves an address exists. Use a simple pattern for a first check and a confirmation email for the truth.

Why do ^ and $ match only once in my multiline text?

By default they match the start and end of the whole text. Turn on the m flag to make them match at every line break.

What does the u flag change?

It makes the engine read the pattern and text as Unicode code points, so characters outside the basic plane count as one, and it enables \p{...} property escapes such as \p{L} for any letter.

Popular Regex Tester pages

  • Email Validation RegexCheck which lines look like an email address, and see why the others do not.
  • URL Regex TesterFind web addresses in a block of text with a pattern you can edit.
  • Phone Number Regex TesterMatch phone numbers written with brackets, dashes, dots or spaces.
  • Date Regex TesterMatch YYYY-MM-DD dates and rewrite them with named groups.
  • IPv4 Address Regex TesterMatch four numbers from 0 to 255 separated by dots.
  • Hex Color Regex TesterFind #rgb and #rrggbb colours in a stylesheet or text.
  • Password Strength RegexSee which sample passwords pass a rule built from lookaheads.
  • Remove Extra Spaces With RegexReplace runs of whitespace with a single space.
  • Extract Numbers With RegexPull every number, including decimals and negatives, out of text.
  • Regex Replace With Capture GroupsReorder words with $1 and $2 in the replacement.
  • Regex Named Groups TesterCapture the level, service and message of a log line by name.

Ulkaa Apps

  • Ulkaa
  • Calendar
  • Task
  • Note
  • Disk
  • Call
  • Contact
  • Mail
  • Finance
  • Health
  • Office
  • Work
  • Workspace
  • Halum
  • Jaal
  • Islam
  • Game
  • Weather
  • Campus
  • News
  • Developer
  • Help
  • Account
About·Privacy·Terms·© 2026 Ulkaa

What is Ulkaa Tool?

Ulkaa Tool is a free collection of fast, privacy-friendly online tools from Ulkaa Network. Calculate your GPA and CGPA, edit rich text, count words and characters, replace text and more — all in your browser.

Every tool runs entirely in your browser — no sign-up, and your data never leaves your device.

Academic

  • GPA Calculator
  • CGPA Calculator
  • Citation Generator
  • Quiz Maker

Text

  • Rich Text Editor
  • Word Counter
  • Character Counter
  • Text Replacement

Ulkaa

  • Ulkaa
  • Ulkaa News
  • Ulkaa Campus
  • Ulkaa Tool
  • Ulkaa Game
  • Ulkaa Weather
  • Ulkaa Islam

Company

  • About Ulkaa
  • Careers
  • Support
  • Help
  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Sitemap

© 2015-26, Ulkaa. All rights reserved.
Facebook PageLinkedIn CompanyX (Twitter) ProfileInstagram ProfileGitHub Account