> I tried [[:space:]] and that did not work but [:space:]? did.
> 
> What is the difference? I'm unclear on that even after reading this
> thread.

[[:space:]] is what you should use if you use the usual regexp-aware
tools like awk, perl, grep, lex and so on. For those tools the outer
[]-s mean "any of the characters inside" and the [:space:] is just a
shorthand to all characters that look like space. The [:space:] is only
meaningful inside an other pair of []-s. If you use it without the
second enclosing[]-s, it the regexp evaluator takes it at face value,
that is "any one of the ':', 's', 'p', 'a', 'c', 'e', ':' characters".
That is, "abcde" matches [:space:] but does not match [[:space:]], but
"  " matches [[:space:]] but won't match [:space:].

OOo/SO treat regexp a different way. For OO [:space:] on its own
means what [[:space:]] is for the rest: any one of the space-like
characters. Except that OOs implementation, apart from being
incompatible with the rest, also has a minor bug. It does not 
recognise [:space:] on its own (standing for one character), only 
as a part of a higher level regexp construct. In [:space:]+ the
+ says "one or more of whatever is before me" and as the 'before me'
part OO processes [:space:] fine. Same with ([:space:]) or an
expression involvoing [:space:]. I do believe it is indeed a genuine
bug. 

Zoltan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to