SparkyGuy <sparkyguy@[EMAIL PROTECTED]
> wrote:
> It turns out that simple range expressions are not sup****ted in this
(very)
> limited set of RegEx:
>
> "\{m,n\} Matches the preceding element at least m and not more than
n times.
> For example, a\{3,5\} matches only "aaa", "aaaa", and "aaaaa". ***This
is not
> found in a few, older instances of regular expressions.***"
> (Emphasis mine.)
That notation is wrong. For extended regular expressions (specifically
"Perl Compatible Regular Expressions"), the curly braces should NOT be
preceded by a backslash. The backslash means "ignore the special meaning
of the next character and treat it as a normal character" (or treat a
normal characgter as a special character, such as \s for space).
The correct syntax for "match at least m but no more than n of any
character" is
..{m,n}
If you used this:
..\{m,n\}
it would mean "match any character, then a "{", then m, then a comma,
then n, then a "}".
If your regular expression engine only sup****ts basic regular
expressions then the "{" and "}" characters have no special meaning and
are treated as normal characters. A backslash in front of them will just
be ignored.
--
David Empson
dempson@[EMAIL PROTECTED]


|