Tool · Power Apps · Power Fx

Regex Tester for Power Fx

Test a pattern for IsMatch, Match and MatchAll against your own text, check it against Power Fx’s regex rules, and copy the formula.

Works with
  • Power Apps
Rules
Match

Pattern

Test text

Results

Formulas

Validate: true or false, for example in a button’s DisplayMode or a label’s Visible.
IsMatch(TextInput1.Text, Match.Email, MatchOptions.Complete)
Extract the first match, then read .FullMatch or .SubMatches.
Match(TextInput1.Text, Match.Email, MatchOptions.Complete)
Extract every match as a table, for example as a gallery’s Items.
MatchAll(TextInput1.Text, Match.Email, MatchOptions.Complete)
  • The pattern and options must be fixed text in the formula. Power Fx doesn’t accept them from a variable.
  • “Power Apps” follows today’s canvas apps. Choose Power Fx 1.0 to check the stricter rules used by Copilot Studio, Dataverse formulas and other hosts.
Predefined patterns (the Match enum)
UseMeans
.
,
\d
.+@.+\.[^.]{2,}
\-
\(
\p{L}
\d+
\p{L}+
\S+
\s+
\S
\d*
\p{L}*
\S*
\s*
\.
\)
\s
\t

Questions

FAQ

Why does my pattern work on regex websites but not in Power Apps?
Every language has its own regex dialect. Power Fx 1.0 allows only features that work the same in JavaScript and .NET, so things like a lone hyphen inside [ ], \d inside [^ ], or (?i) in the middle of a pattern give an authoring error. Choose Power Fx 1.0 and the tester points to each problem.
What is the difference between “Power Apps” and “Power Fx 1.0”?
Canvas apps today use an earlier version of Power Fx regular expressions with fewer checks and fewer features: no DotAll or FreeSpacing, numbered submatches always on, and simpler Match.Email and Match.Hyphen patterns. Power Fx 1.0 is used by Copilot Studio, Dataverse formulas and other hosts, and is coming to canvas apps behind the “Power Fx V1.0 compatibility” switch.
Why does IsMatch say false when the text contains a match?
In Power Apps, IsMatch checks the whole text by default (MatchOptions.Complete). Choose “Anywhere” to test with MatchOptions.Contains, which Match and MatchAll use by default.
How do I get a part of the match?
Name it with (?<name>...), then read it from Match, for example Match(TextInput1.Text, "(?<area>\d{3})-\d{4}").area. With NumberedSubMatches, plain ( ) groups are listed in the SubMatches table instead.
Can I put the pattern in a variable?
No. Power Fx checks the pattern while you write the formula, so it must be fixed text. You can join fixed pieces with &, such as "A" & Match.MultipleDigits.
Are the results exactly what Power Fx returns?
For Power Fx 1.0 the tester translates your pattern the way the rules define it, including Unicode \d, \w, \s and \b, so results should match. Always test critical patterns in your app too.

↑ ↓ moveEnter open