RegExp bug ?
Posted: February 10th, 2017, 9:44 am
Hello,
it's drive me crazy...
I'm have test this sample code with node.js, in a developper console (firefox), in ExtenSript Toolkit and in AfterEffects:
What i want is find "aep" in a string but exclude "auto-save"; easy...no?
All javascript engines return correct result ("true false") but not ExtendSript nor AfterEffects ("true true").
it's drive me crazy...
I'm have test this sample code with node.js, in a developper console (firefox), in ExtenSript Toolkit and in AfterEffects:
Code: Select all
var reg = new RegExp("^(?!.*auto-save).*aep$");
var string1 = "Comp.aep"
var string2 = "Comp auto-save.aep"
alert(reg.test(string1) + " " + reg.test(string2));
All javascript engines return correct result ("true false") but not ExtendSript nor AfterEffects ("true true").