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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

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

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,246)