GGuezet
6 years agoContributor
Using negative look-ahead in non-native regex ?
Hi everyone, I'm currently trying to make a nice regex allowing me to get all processes with a certain name.
For that, I'm using Sys.FindAll("ProcessName", "regexp:MyRegex")
I want to find, for exemple, all the processes with a name starting with "myProcess_" but excluding "myProcess_other"
I've constructed the following regex :
(myProcess_(?!.*(other)).+)
This regex works perfectly fine in many regex testing websites.
Then, i'm using it like that :
Sys.FindAll("ProcessName", "regexp:(myProcess_(?!.*(other)).+)")
But it's failling to find any processes.
Any time i'm using a negative look-ahead, it's not finding anything.
Any suggestions ?
Thanks