On Wednesday, February 21, 2007 6:13 AM [GMT+1=CET],
ben <[EMAIL PROTECTED]> wrote:
Harold Fuchs wrote:
You seem to have found a bug. Instead of using "[:digit:]", please try
"[0-9]". This seems to work.
Please register your finding as an issue on the OO web site.
I don't think there is a bug. A specification like [:xxx:] is used
when searching for a _string_ of objects of a certain type.
The part that replaces xxx specifies the _type_ of object one is
looking for (e.g., replacing xxx by digit specifies a decimal digit).
By itself, a specification like[:xxx:] is incomplete; one must also
state the _length of string_ (and that can be done with ? , + , or
{k}). Thus search for [:digit:]? finds the next decimal digit (string of
digits, of length 1)
search for [:digit:]+ finds the next string of decimal digits (of
any length)
search for [:digit:]{2} finds the next string of 2 decimal digits
etc
Likewise for [:space:]?, [:space:]+, [:space:]{2} and other such
searches.
Vous êtes d'accord?
C'est simple, n'est-ce pas?
Ben
Oui, vraiment c'est très simple.
Seems you are right; certainly searching for "[:digit:]?" works; and I have
misunderstood that part of RE syntax for many years.
Thank you.
On the other hand ;-) why does "[0-9]" work but "[:digit:]" doesn't?
Harold Fuchs
London, England
Please reply only to [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]