Regular expression to validate a string
Hi Team
I am looking for a regular expression to match 3 pre-defined values under a simple string attribute of type text.
The requirement is to enter either of the three values:
Required, Not Required, Done
I have written the below expression to validate:
(^|\s)Required|Not Required|Done(\s|$)
This works only for the first value.
If I enter the same value or different value on the new line; it gives me an error.
Please let me know what am I missing here.
Thanks
Rajat
|
Be the first one to answer this question!
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Managed to get the following expression working
Use the "i" switch.
Thanks but it does not work when using \n.
Rajat