|
| On Jun 21, 8:39 am, Geoff Clare <g...@clare.See-My-Signature.invalid>
wrote:
> bpatton wrote:
>
>
>
>
> If you actually used "[:space:]*COMMENT[:space:]*" then the reason
> it "worked" is because it is equivalent to just "COMMENT". The "*"
> matches _zero_ or more repetitions. The "[:space:]" does not match
> a whitespace character, it matches ':', 's', 'p', 'a', 'c' or 'e'.
> To match a whitespace character you need "[[:space:]]".
>
> The equivalent of your PERL RE is:
>
> "^[[:space:]]*COMMENT[[:space:]]*=[[:space:]]*\""
>
> --
> Geoff Clare <netn...@gclare.org.uk>
Oops, my fault. I hadn't intended to rewrite his entire regular
expression--just meant to give an example of using character classes
in bracket expressions. Of course, I clearly forgot you still needed
the outer brackets as well. This is part of why I find PERL regular
expressions preferrable ;)
Hyuga
|
|