I am using a regex expression to validate an input. I would like to match the exact strings "spe1" and "spe1.grl".
So far I have written the following code:
'\\b(?!i' + this.stringToIgnore + '\\b)\\w+';
where this.stringToIgnore = 'spe1'
this work if I type:
"spe1 " (note the space)
I would like to have a match as soon as I type:
"spe1" (without the need to add a space or dot at the end)
"spe1.grl" (without the need to add a space or dot at the end)
Thank you for your help