How to use Regex to get matching list of records with specific regular expression in Background ScriptSummaryUseCase: Customer needs to find transaction log entries by the user "guest" and those matching the Regex /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.Instructions-- Tested in OOB instance with creating dummy user with user_od having similar syntax as customer scenarioUser:Test User with user id: 0127761e-41b4-4885-ba77-fc246e3300e2 -- Sample code snippetvar gr = new GlideRecord("syslog_transaction");gr.addEncodedQuery("sys_created_onONThis week@javascript:gs.beginningOfThisWeek()@javascript:gs.endOfThisWeek()^urlSTARTSWITH/api/now/");gr.query();gs.info(gr.getRowCount());while (gr.next()) {var str = gr.sys_created_by;var regex = /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/;if(regex.test(str))gs.print('satisfied -- sys_id : ' + gr.sys_id + ' : sys_created_by : ' + gr.sys_created_by );else{gs.print('not satisfied -- sys_id : ' + gr.sys_id + ' : sys_created_by : ' + gr.sys_created_by );}}[0:00:00.646] Script completed in scope global: script*** Script: 2638 *** Script: not satisfied -- sys_id : 9198c6241bab6d1038b80b05464bcb4d : sys_created_by : abc*** Script: not satisfied -- sys_id : 93098a641bab6d1038b80b05464bcbc9 : sys_created_by : xyz*** Script: satisfied -- sys_id : 935056e81bab6d1038b80b05464bcb33 : sys_created_by : 0127761e-41b4-4885-ba77-fc246e3300e2*** Script: satisfied -- sys_id : 93ddcee41bab6d1038b80b05464bcbf1 : sys_created_by : 0127761e-41b4-4885-ba77-fc246e3300e2Related LinksReference product docs: https://docs.servicenow.com/bundle/utah-api-reference/page/script/general-scripting/concept/c_RegularExpressionsInScripts.html