cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Checking string of certain format

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
Highlighted
Community Support
Community Support

Re: Checking string of certain format

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

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

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.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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