in reply to Re: positive integer identification (regular expression question)
in thread positive integer identification (regular expression question)
Is there any reason why capturing parentheses are used around \.0*
Also the ? does not make the preceeding pattern optional. As per the Camel book p. 39 "you can force nongreedy, minimal matching by placing a question mark after any quantifier". A ? not immediately preceeded by a quantifier thus has no sense.
In order to make the preceeding pattern optional use the *-quantifier, which means zero or more times.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: positive integer identification (regular expression question)
by Enlil (Parson) on Feb 06, 2003 at 22:32 UTC | |
by CountZero (Bishop) on Feb 08, 2003 at 19:40 UTC |