- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2023 10:37 PM
Dear Community,
On the Service catalog form we ask users for provide FQDM/Fully Qualified Domain name (www.example.com, www.example.co.uk, etc). ServiceNow has out-of-the box Regular expression for URL, however it contains "http". Which regular expression should be used to check user provided URL in FQDM format only, no additional characters allowed. Thanks!
Regards,
Mantautas.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2023 04:14 AM
Valid point! 🙂 Try this:
/^(?!:\/\/)(w{3}+\.)?[a-zA-Z0-9][a-zA-Z0-9-]+\.[a-zA-Z]{2,6}?$/ji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2023 08:10 AM
Perhaps this minor change at the end would do:
^(?!:\/\/)(w{3}+\.)?[a-zA-Z0-9][a-zA-Z0-9-]+\.[a-zA-Z\.]{2,6}?$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2023 04:17 AM
It works! Thanks a lot. Last question - what if domain consists of "www.example.co.uk" ? The current rule will not allow such address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2023 08:10 AM
Perhaps this minor change at the end would do:
^(?!:\/\/)(w{3}+\.)?[a-zA-Z0-9][a-zA-Z0-9-]+\.[a-zA-Z\.]{2,6}?$