I am trying to imitate the look in Javascript,
I want to match the string "object.all", but not "object.call". I tried:
new RegExp('(?!(\\.))all')
But both examples are selected, I want to look to check if there are any . (period) just for all , can someone explain to me what is wrong in my regex?
Thank you in advance
It's good:
'object.all'.replace(new RegExp('(?!(\\.))all'), 'foo')
For this, I expect the result to be "object.call":
'object.call'.replace(new RegExp('(?!(\\.))all'), 'foo')
source share