You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-dev@jakarta.apache.org by Nathan Coast <na...@netdecisions.co.uk> on 2000/06/29 19:58:50 UTC
confusing behaviour of regexp code
firstly is this the correct place to be sending these sort of questions?
If not, sorry - can someone point me in the right direction.
why should the ordering of the character values within [ ] be significant?
e.g. this string "-12+)( 3 "
is failed by
^[\\(\\)0-9\\-\\+ ]+$
and passed by
^[0-9\\-\\+ \\(\\)]+$
Thanks
Nathan
Re: confusing behaviour of regexp code
Posted by Jon Stevens <jo...@latchkey.com>.
on 6/29/2000 10:58 AM, "Nathan Coast" <na...@netdecisions.co.uk>
wrote:
> firstly is this the correct place to be sending these sort of questions?
yes.
> why should the ordering of the character values within [ ] be significant?
>
> e.g. this string "-12+)( 3 "
>
> is failed by
>
> ^[\\(\\)0-9\\-\\+ ]+$
>
> and passed by
>
> ^[0-9\\-\\+ \\(\\)]+$
Ug. I'm no regex expert, but it sounds like it could be a bug.
-jon