Hello all,
I'm starting with Javacc and it isn't getting easy... there seems to
lack some do***entation on regular expressions.
My goal is to create a regular expression that matches an unpadded
number with 3 digits maximum. For example, 298 or 12 or 1 would all
match this regular expression.
I've been using every variation I can imagine, and it simply doesn't
seem to work.
For example, shouldn't something like this work?
(["1"-"9"]["0"-"9"]["0"-"9"]|["1"-"9"]["0"-"9"]|["1"-"9"])
It works for an unpadded number with 2 digits, that is (["1"-"9"]
["0"-"9"]|["1"-"9"]) , but with 3 or digits it always fails.
So, if any of you knows the secret formula for this, please let me
know!
Thanks for your help.
Raul


|