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.

Need code to generate random value from any type of regex [ eg:[A-Za-z0-9]@[A-Za-z0-9].[A-Za-z]{2,3}

sachincalsoft
Tera Contributor

Hi team,

I need help to write a script in ServiceNow which will generate random value which will satisfy the give regex of any type.

Regex can be alpha numeric or or any format.

Example of the regex: [A-Za-z0-9]@[A-Za-z0-9].[A-Za-z]{2,3}

Please help

5 REPLIES 5

output can be any random value which satisfies the given regex.

As discussed given regex can be of any complex type