Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

SNC.regex is invalid in scoped application

Shalini32
Tera Expert

Hello folks,

I am trying to access SNC in scoped application  - 

Code - 

var reg = new SNC.Regex('/\\$\\{(.*?)\\}/i');
var match = reg.match(<htmlString>);

 

Error - 

Invalid object in scoped script: [object SNC]

 Please suggest how I can use SNC in my scoped application

2 REPLIES 2

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Shalini32 ,

Check below thread :-

SNC Regex API Throwing Exception in Scoped Application 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Solution mentioned is giving me null

Is there any way  to use SNC in scoped apps?