Skip to content

Regex Tester

Regular expressions describe patterns in text, such as an email address, a phone number or an invoice number. In Power Apps they power IsMatch, Match and MatchAll. Writing them blind is slow, because the only feedback is a form that refuses to submit. This regex tester shows every match, its position and its capture groups as you type, so you can get the pattern right before you put it in a formula.

Also known as: regex online, regular expression tester, test regex, javascript regex tester.

    Your data is processed locally in your browser and is not uploaded to our servers.

    Features

    • Live results as you type
    • Capture groups shown for each match
    • Flags field (g, i, m, s, u)

    How to use the Regex Tester

    1. Type your pattern in the Pattern box, without surrounding slashes.
    2. Set the flags. The g flag (all matches) is always applied. Add i to ignore case, m for multi-line text or s so a dot matches new lines.
    3. Paste a realistic test string, ideally several lines of real data.
    4. Read the match list. Each match shows its position and any capture groups.
    5. When the pattern behaves, copy it into IsMatch, Match or MatchAll and test it again in Power Apps Studio.

    Real-world use case: validating input and extracting values in Power Apps

    Take a form where users type a phone number. You want to block the Submit button until the text looks right. The formula IsMatch(txtPhone.Text, "^\+?[0-9]{10,13}quot;) does that, and the pattern is easy to debug here: paste ten or twelve realistic numbers, including bad ones, and watch which lines match. Trying the same thing inside the app is much slower, because every change means another manual test.

    Extraction is the second use. Support notes might contain invoice numbers such as INV-10234. The formula Match(txtNote.Text, "INV-(?<num>\d{5})").num returns 10234. The tester shows the full match and the captured group, so you can see exactly which part of the text is returned. Use MatchAll when a text can contain several matches and you want all of them as a table.

    One difference catches many makers out. IsMatch tests the whole text by default, so a pattern that finds a match here can return false in your app unless you add .* around it or use the Contains match option, while Match and MatchAll search inside the text. This tester uses the JavaScript engine of your browser, so confirm the final result in Power Apps Studio, because Power Fx has its own regular expression support with some differences.

    Power Automate expressions have no built-in regex function. When a flow needs one, people usually move that step into Power Apps, an Office Script or an Azure function. Testing the pattern here first still saves time.

    Example input and output

    Pattern and test string

    Pattern: INV-(?<num>\d{5})
    Text:    Paid INV-10234 on Friday

    Result in the tester

    1 match
    #1 at 5: "INV-10234"  groups: ["10234"]

    The same pattern in Power Fx

    Match(txtNote.Text, "INV-(?<num>\d{5})").num
    // returns 10234

    Frequently asked questions

    Which regex flavor does this tester use?

    It uses the JavaScript (ECMAScript) engine of your browser. Power Fx and other languages have their own regex support with small differences, so always confirm the pattern in your own app.

    Why does IsMatch return false when my pattern matches here?

    IsMatch checks the entire text by default. Add .* before and after your pattern, or use the Contains match option, to allow a partial match.

    What do the regex flags mean?

    The g flag finds all matches, i ignores case, m makes ^ and $ work on each line, s lets the dot match line breaks and u turns on full Unicode support.

    Why use PowerApps Ninja?

    Test strings often come from real data such as customer notes, emails and IDs. PowerApps Ninja runs your pattern in the browser and sends nothing to a server. The page connects regex to Power Apps formulas, with IsMatch and Match examples, instead of treating it as a generic programming topic.

    Related tools