const regex = new RegExp('(?i)\\b(baba(ji)?|fifa.*coins?|fifabay|(hotmail|gmail|outlook) ?(password( recovery)?|tech)? (support|contact|telephone) number|nike|tosterone|bajotz|vashi?k[ae]r[ae]n|sumer|kolcak|porn|molvi|judi bola|ituBola.com|lost lover|11s|acai|skin care|rejuvenated skin|LifeForce|swtor2credits|me2.do|black magic|bam2u|Neuro(3X|flexyn)|Nutra|TesteroneXL|Bowtrol|Slim ?Genix|Cleanse EFX|Babyliss ?Pro|Forskolin|Blackline Elite|TestCore Pro|Xtreme Antler|Maxx Test 3000|Cheap Wigs?|jivam|(Improve )?Brain Power|aging skin|acne( prone)? skin|(skin )?eye serum|skin (serum|eye)|(fake|original) (passports?|driver\\'?s? licen[cs]e|ID cards?)|bagprada|6611165613)\\b|ಌ|(support|service|helpline)( phone)? number|1[ -]?[ -]?866[ -]?[ -]?978[ -]?6[ -]?819|(>>>>|===>|==>>>)(?s).*htt', 'gu')
const str = `Gmail Tech Support (1-844-202-5571) Gmail tech support number[Toll Free Number]?
<>1 - 866-978-6819<>gmail password reset//gmail contact number//gmail customer service//gmail help number
Hotmail technical support1 - 844-780-67 62 telephone number Hotmail support helpline number
[[[[[1-844-202-5571]]]]]Gmail Tech support[*]Gmail tech support number
@@<>1 -866-978-6819 FREE<><><::::::@Gmail password recovery telephone number
1 - 844-780-6762 outlook password recovery number-outlook password recovery contact number-outlook password recovery helpline number`;
// Reset `lastIndex` if this regex is defined globally
// regex.lastIndex = 0;
let m;
while ((m = regex.exec(str)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === regex.lastIndex) {
regex.lastIndex++;
}
// The result can be accessed through the `m`-variable.
m.forEach((match, groupIndex) => {
console.log(`Found match, group ${groupIndex}: ${match}`);
});
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions