BA asdffdsa at
Tue May 15 14:00:14 CEST 2001

urrite. i made something simple much too complicated.
i will drop a buck in the bucket.
thanks again.

"Andrew Kuchling" <akuchlin at> wrote in message
news:3du22odmx1.fsf at
> "BA" <asdffdsa at> writes:
> > the concept is that i do not care if there is leading white space or
not. i
> > do care that the first non-white space character is NOT a single quote.
i am
> >     pat_oe_ok1=r"^[^']\s*Option Explicit"
> >     pat_oe_ok2=r"^\s*[^']\s*Option Explicit"
> Dissect these patterns:
>    ^              # Match at start of string
>    [^']           # Match a single character that isn't "'"
>    \s*            # Match zero or more whitespace characters
>    Option Explicit# Match this literal string.
> It's not really clear to me exactly what you're trying to match
> because I didn't understand your explanation.  I don't see why the
> simple pattern "^\s*Option Explicit" wouldn't be a suitable pattern;
> you don't have to match strings like "print Option Explicit", do you?
> BTW, see the Regular Expression HOWTO at
> ; it may explain regex patterns
> in more detail than the book you're using.
> --amk

More information about the Python-list mailing list