Saturday, 17 August 2013

Regular expression ([-(?!\[|\]|\ )09XYAB\[\]\-]){0,} not working

Regular expression ([-(?!\[|\]|\ )09XYAB\[\]\-]){0,} not working

I'm a newbie in the world of regular expressions and have searched a great
deal about them. I'm writing a Regex that must fulfill the following
conditions. Allowed characters 09XYAB[]- but after a '-' i cannot have a
space, a ']' or '['. Furthermore i will have to check the order of the
brackets.
I've written this expression '([-(?![|]|\ )09XYAB[]-]){0,}' but i keep
getting the fault results on lets say this test string 'ABY-Ab[A0-]'.
Please help me in this regard.

No comments:

Post a Comment