kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #35711
RegEx help
We have a couple of regular expressions of the form:
wxRegEx re( ".*?\\$\\{(.+?)\\}.*?", wxRE_ADVANCED );
Now perhaps I’m too old to remember this stuff correctly, but .*? is redundant, isn’t it?
And shouldn’t .+? just be .*? (And for that matter, shouldn’t it really be [^}]*?)
Thanks,
Jeff.
Note that I’m looking at this because it needs to check for both ${…} and $(…) formatted envvars, which I think boils down to:
.*(\\$\\{([^}]*)\\})|(\\$\\(([^)]*)\\)).*
Follow ups