Allow only Alphanumeric values and special characters _ - @
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2020 09:55 AM
Catalog variable "username" should allow alphabets, numbers and special characters only _ - @
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2020 10:07 AM
You can use this regex /^[ A-Za-z0-9_@./#&+-]*$/.
To know more about regex ,watch this videos.
https://community.servicenow.com/community?id=community_question&sys_id=93860b25db1cdbc01dcaf3231f9619f0
Regards
Pranav

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2020 06:05 AM
Hi
Hope you are doing good.
Is this question resolved or you need some more assistance?
if your query is resolved then please mark the correct response so that this thread can be closed.
Regards
Pranav

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2020 12:12 PM
Hello Krishna,
you can create a regex on your variable in Servicenow without any script. Check this out
And for the regex, you can say it like this
^[ A-Za-z0-9_@-]*$
Mark the comment as a correct answer and helpful if it helps to solve the problem.