> I played around with this using Calc and found that [:digit:] only > works when used with a question mark at the end. Also, it finds only > the first digit in either a number or a string. It doesn't yield a > different result if multiple brackets are used. [:space:]? finds > spaces in Calc as there is usually little else in a Calc application.
Yes, I'm playing with it too. OO/SO seems to treat the expressions differently from any other regexp based tools. The [:...:] construct in normal regexp is only valid within []-s, that is, in abc[:space:]xyz the [:space:] will be interpreted as "one of :, s, p, a, c, e" and it gets its set meaning (i.e. all whitespace characters) when it is within an other set of square braces. Which is actually different from what I wrote in my previous message, but this one is the correct one. I've should have checked before writing the first post :-( Nevertheless, OO does not do it that way, it interprets [:...:] as a set on its own and thus you can not combine sets the way you do in normal regexps. In normal regexp you can write [[:digit][:space:]] which will match anything that is either some sort of space or a digit, in the OO regexp the above is simply not working but ([:digit:]|[:space:]) does. Experiments also show that the [:..:] in OO only works if it is part of an expression. That is, [:digit:] does not find digits, but ([:digit:]), [:digit:]+, [:digit:]* and so on do. Zoltan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
