- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 06:59 AM
Hi!
Can you help me with a Regex validation for string field, I need to prevent that the first character be: space, '-', '(', ')', ', '//', '\\'
I need to prevent that the string CANNOT start with a SPECIAL CHARACTER or a BLANK space and ','strictly not allowed in any field.
"." "/" These are allowed and upper letters ASCII and numbers.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 10:41 PM
Hi @Carina4 ,
Sure, here's a regular expression pattern that satisfies your requirements:
^([A-Z0-9./][A-Z0-9./]*)$
This pattern ensures that the string must start with an uppercase letter, number, . or /, and then can be followed by any combination of uppercase letters, numbers, ., or /. It disallows any string that starts with a special character or a blank space and strictly does not allow a comma. I hope this helps!
Please mark my solution as helpful if it worked for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 10:28 PM
Hello @Carina4 ,
Try using this Regex ^[A-Za-z0-9./][A-Za-z0-9./]*$
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Priyanka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 10:41 PM
Hi @Carina4 ,
Sure, here's a regular expression pattern that satisfies your requirements:
^([A-Z0-9./][A-Z0-9./]*)$
This pattern ensures that the string must start with an uppercase letter, number, . or /, and then can be followed by any combination of uppercase letters, numbers, ., or /. It disallows any string that starts with a special character or a blank space and strictly does not allow a comma. I hope this helps!
Please mark my solution as helpful if it worked for you.