DMCIT SERVICES
HomeServicesBlogContactLogin
DMCIT SERVICES

Expert consulting in Data, Mobile, and Cloud solutions to drive your digital transformation.

// Quick Links
  • Home
  • Services
  • Blog
  • Contact
  • Free Tools
// Services
  • Data Destruction
  • Mobile Device Management
  • Cloud Infrastructure
  • Digital Transformation
// Contact
[email protected]
07472 952393
Data Mobile Cloud
Unit A, 82 James Carter Road,
Mildenhall,
IP28 7DE

© 2026 Data Mobile Cloud. All rights reserved.

// FREE IT TOOLS

Regex Tester

Test regular expressions in real time. Highlights all matches, shows capture groups, and previews find-and-replace output — all in your browser.

  1. Home
  2. /
  3. Free IT Tools
  4. /
  5. Regex Tester
//
// TEST STRING

All processing happens in your browser

Enter a pattern and test string to see matches

What is a Regular Expression?

A regular expression (regex) is a sequence of characters that defines a search pattern. Used for string matching, validation, extraction, and replacement, regex is built into virtually every programming language and text editor.

This tool uses JavaScript's built-in RegExp engine, which supports the ECMAScript regex specification including lookaheads, lookbehinds, named capture groups, and Unicode property escapes.

Regex Flags Explained

FlagEffectExample
gGlobal — find all matches, not just the first/a/g matches every "a"
iCase-insensitive — ignore letter case/hello/i matches "Hello"
mMultiline — ^ and $ match line boundaries/^foo/m matches at start of each line
sDotAll — . matches newlines/a.b/s matches "a\nb"

Capture Groups and Backreferences

Parentheses (...) create capture groups that extract part of a match. Numbered groups are referenced as $1, $2, etc. in replacement strings. Named groups use the syntax (?<name>...) and are referenced as $<name>.

For example, (\d4)-(\d2)-(\d2) matches a date like 2024-03-15. Using $3/$2/$1 as the replacement string reformats it to 15/03/2024.

Common Regex Patterns

MatchesPatternExample
Email[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}[email protected]
IPv4\b(?:\d{1,3}\.){3}\d{1,3}\b192.168.1.1
Digits\d+42
Whitespace\s+spaces and tabs
URLhttps?://[\w.-]+https://example.com

Frequently Asked Questions

Is my data sent to a server?
No. All regex matching and replacement happens entirely in your browser using JavaScript. Your test strings and patterns never leave your device.
Why isn't my pattern matching?
Common issues include: forgetting to escape special characters (use \ before ., *, +, ?, [, ], (, ), {, }, |, ^, $); missing the right flags (add i for case-insensitive, g for all matches); and backslashes being consumed by string escaping (use \\ in JavaScript strings to represent a single \ in the regex).
What does the g flag do?
Without the g (global) flag, most regex operations find only the first match. With g, the engine continues searching from where the previous match ended, finding all occurrences in the string. This tool always uses g internally for match display, but the replace operation respects your flag selection.
Can I use lookaheads and lookbehinds?
Yes. JavaScript's RegExp engine supports positive lookaheads (?=...), negative lookaheads (?!...), positive lookbehinds (?<=...), and negative lookbehinds (?<!...). These are available in all modern browsers and Node.js 10+.
// DEVOPS & BACKEND

Need help with log parsing or data pipelines?

DMC IT Services builds and manages data processing infrastructure for SMBs across London, Cambridge, Hertfordshire, and Bedfordshire — from log aggregation and text extraction pipelines to automated monitoring and alerting.

Talk to an Engineer
← Back to all free tools