Matches Regex in Condition Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2015 06:47 AM
I'm trying to build a condition which matches a string to a regular expression. Matches Regex is a default option in the condition builder for String-type fields, per the wiki Condition Builder - ServiceNow Wiki. However I can't seem to figure out the proper syntax. I did find this community thread: RegEx in condition builder which was helpful but didn't solve the problem. I'm trying to match a field when it has 11 or fewer characters (large text field, used for descriptions etc). From research, the regex I should use is .{0,11}$ -- any character from 0 to 11 occurrences, followed by string end. I know for a fact there are records matching this condition, but the query returns nothing.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 09:30 AM
I see that you have had your share of trouble
I agree that my workaround is not really fit for huge results.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 09:09 AM
Your syntax will be
<field > matches regex ^.{0,11}$

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 09:23 AM
Abhinay, this is not working.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 09:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2016 10:06 AM