Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

My regex not working with work flow validator

Nannette Mori
Contributor
June 22, 2020

I want to validate that users are entering a classification before there summary text.

So I want to check if the summary starts with (U) or (S) or (TS)

for my regex I input 

^([US])* or (TS)*

this doesn't seem to work.  The error displays even after I have entered one of the classifications.

ex:  summary would be (U) This is my Summary. If it didn't contain (U) it should throw an error.

Is my regex not correct?

2 answers

2 accepted

0 votes
Answer accepted
Subrat Mishra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 23, 2020

^(?:U|S|TS).*

0 votes
Answer accepted
Vikrant Yadav
Community Champion
June 23, 2020

Hi @Nannette Mori  Try to use | instead of or

 

^([US])* | (TS)*

Subrat Mishra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 23, 2020

^(?:U|S|TS).*

Suggest an answer

Log in or Sign up to answer