Match Regex in Condition Builder

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2020 01:39 AM
Hi all, I was wondering if someone could set me right. I am trying to use the "matches regex" operator in the condition builder for an assignment rule. So I set:
Short Description - matches regex - /\bSAP\b
That does not work. I tried "/\bSAP\b", "./\bSAP\b", "/\bSAP\b/g", "/\bSAP\b/", "\bSAP\b" (without "" obviously)
All those work fine in the Regex tester, but I get no hit if I use it in Servicenow
What I am trying to do is find instances of SAP but not ASAP, disapear, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2020 01:42 AM
Hi,
check below link:
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2020 01:54 AM
Hi Ankur,
I found that one as well, but, as the last answer is three years old, I thought this might have been addressed. I do not want to work with script includes and whatnot for a simple condition.
Regards
Bjoern
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2020 04:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2021 07:03 AM
Bjoern,
Did you find a solution? I am experiencing the same thing.
Thanks!
Kim