SNC Regex API Throwing Exception in Scoped Application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 06:50 AM
Hi,
I am trying to use SNC Regex in a scoped application and its throwing an exception. Is there anything for scoped application in Servicenow?
Any help in this regard is appreciated.
Regards,
JS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 10:48 AM
Hi John,
Try using SNRegExp It works in scoped application.. simple example would be
var pattern = new SNRegExp('-X-');
var results = ('_-X-__-XX-___-XXX-').match(pattern);
if(results !== null) {
gs.info("match: " + results);
//results = pattern.match();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2022 05:30 AM
SNRegExp is allowed but giving null for my string. For a requirement I need to use SNC.regex