in reply to Driving the Engine right off the road
but it doesn't. So use a lookahead instead, to test that the entire string is the expected characters but doesn't match your exclusion at the beginning:/^[_A-Z0-9]+$(?<!^XDG_.*_PATH)/
or (and this is almost always the more readable approach), do it in code:/^(?!XDG_.*_PATH$)[_A-Z0-9]+$/
/^[_A-Z0-9]+$/ && ! /^XDG_.*_PATH$/
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Driving the Engine right off the road
by swl (Prior) on Aug 24, 2025 at 22:53 UTC | |
by ysth (Canon) on Aug 25, 2025 at 22:29 UTC | |
Re^2: Driving the Engine right off the road
by ysth (Canon) on Aug 24, 2025 at 14:58 UTC | |
by Intrepid (Curate) on Aug 24, 2025 at 21:55 UTC |