Hi Experts,
I would like to seek your assistance on the validation syntax for an "IsMatch" function.
Here is my formula,
IsMatch(
TextInput2.Text,
"\d{7}\,*\s*",
MatchOptions.BeginsWith
)
This does not seem to be working, please assist. Thank you.
Hi @Franklin_vaz ,
The replacement of the space was "in case" one was put in as if I did not clean it up, the Split() parts could contain a space and therefore not pass validation, so yes, the results of your three points were intentional.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Many thanks, @WarrenBelz for your quick response.
Validation works, and I can understand your logic.
Here is some feedback,
Curious to ask; the test you did, was it the same case?
Hi @Franklin_vaz ,
Best effort below (did my head in a bit, but seems to work on test model)
With(
{
wText:
Substitute(
TextInput2.Text,
" ",
""
)
},
If(
Find(
",",
wText
) = 0,
IsMatch(
wText,
Digit & Digit & Digit & Digit & Digit & Digit & Digit
),
With(
{
wStrings:
Split(
wText,
","
)
},
CountRows(
Filter(
wStrings,
IsMatch(
Result,
Digit & Digit & Digit & Digit & Digit & Digit & Digit
)
)
) = CountRows(wStrings)
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2