C
Christine Mayer
Hi,
I need a regular expression - it should:
Allow all Strings that do not begin with "car_"
Examples - ok would be:
car
carwash
1
a
1234
abcdefgh
a1b2
not ok was:
car_
car_1
car_a
car_1234
car_abcdefgh
car_a1b2
On Google, I basically found the expression:
..*(?<!car_)wash
On its basis, I build:
(?<!car_)[0-9A-Za-z_+\-]+
However, it doesn't work as required - I guess, because the String
that follows
defined by "0-9A-Za-z_+\-" could be "car_" too! In other words, this
rule says
Don't start the String with "car_" but after that you may write car_ -
so the String MAY begin with car_
Any idea how to fix that?
Thx,
Christine
I need a regular expression - it should:
Allow all Strings that do not begin with "car_"
Examples - ok would be:
car
carwash
1
a
1234
abcdefgh
a1b2
not ok was:
car_
car_1
car_a
car_1234
car_abcdefgh
car_a1b2
On Google, I basically found the expression:
..*(?<!car_)wash
On its basis, I build:
(?<!car_)[0-9A-Za-z_+\-]+
However, it doesn't work as required - I guess, because the String
that follows
defined by "0-9A-Za-z_+\-" could be "car_" too! In other words, this
rule says
Don't start the String with "car_" but after that you may write car_ -
so the String MAY begin with car_
Any idea how to fix that?
Thx,
Christine