[Solved] What will be the Regular expression for matching a constant word ending with number
[ad_1] You can try this: var str=”RANDOM1″; if(/^RANDOM\d+$/gi.test(str)) console.log(‘true’); else console.log(‘false’); [ad_2] solved What will be the Regular expression for matching a constant word ending with number