GGetWebTool

Utilities

Regex Tester

Test regular expressions with instant match highlighting.

100% client-side · Data never leaves your device · Free forever

Matches: 0

    How to use it

    1. Type a pattern.
    2. Paste your text.
    3. See every match highlighted.

    Why use it

    • Test patterns without running code.
    • See every match and capture group.
    • Toggle flags to refine results.
    • Catch mistakes before they ship.
    • Instant with no install.

    What is a regular expression?

    A regular expression (regex) is a sequence of characters that defines a search pattern. It is used to match, capture, and extract text in programming languages, text editors, command-line tools, and data pipelines. Once you learn regex, patterns like validating an email, extracting URLs, or finding all number ranges become a single line of code.

    Common building blocks

    PatternMeaningExample
    \dAny digita\db matches "a1b"
    \wAny word character (letter, digit, _)\w+ matches a word
    \sAny whitespacea\sb matches "a b"
    .Any single characterc.t matches "cat"
    *Zero or more of the previousab*c matches "ac" and "abbc"
    +One or more of the previousab+c matches "abbc" but not "ac"
    ^Start of string / start of line (with m)^abc matches "abc..."
    $End of string / end of line (with m)xyz$ matches "...xyz"
    (...)Capture group(\d+)px captures the number
    [a-z]Any character in a range[a-z0-9] matches a lowercase letter or digit

    Regex flags explained

    • g (global): find all matches instead of stopping at the first one.
    • i (ignore case): match letters regardless of case.
    • m (multiline): make ^ and $ match the start/end of each line.
    • s (dot all): make the dot match newline characters too.

    Combining these flags is where regex gets powerful. For example, pattern /is/gifinds every occurrence of "is" or "IS" across all lines of a document. Use this tester to see exactly how your pattern and flags behave before you commit them to code.

    Frequently asked questions

    Which regex syntax does the tester use?

    The tester uses JavaScript's regular expression engine, which follows ECMAScript syntax. This is the most common syntax for web, Node.js, and many CLI tools.

    Does the regex tester upload my data?

    No. Your pattern and test strings are processed locally in your browser and never sent to a server, keeping sensitive text private.

    Can I test lookaheads and capture groups?

    Yes. Lookaheads, lookbehinds, named capture groups, and non-capturing groups are all supported, and captured groups are highlighted in the results.