cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Checking string of certain format

Hi all,

 

I am not very good with string. I wanted to check if the string contains the following format "AA1-SNN-MMYY" where "AA" represent any 2 letters from A to Z, SNN should be in number e.g. 001, 002, and MMYY is in number 0622 for jun and year 2022 in text input control before my "warning label" visibility goes from "true" to "false" How should the "if" formula be written to check if the text input contain the format required?

 

Thanks for reading and your help !    

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Boon-1 ,

 

Please try this on.

If(IsMatch(TextInput.Text,"\p{L}{2}1-\d{3}-(0?[1-9]|1[012])\d{2}"),truelogic,falselogic)

Snipaste_2020-07-06_14-58-30.png 

Hope this helps.

Sik

 

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @Boon-1 ,

 

Please try this on.

If(IsMatch(TextInput.Text,"\p{L}{2}1-\d{3}-(0?[1-9]|1[012])\d{2}"),truelogic,falselogic)

Snipaste_2020-07-06_14-58-30.png 

Hope this helps.

Sik

 

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (30,973)