On 03/17/2005-10:15AM, Mike Hall wrote:
>
> Very nice sir. I'm interested in what you're doing here with
> the caret metacharacter. For one thing, why enclose it and the
> whitespace flag within a character class?
A caret as the first charachter in a class is a negation.
So this [^\s]+ means
On 03/18/2005-10:35AM, Mike Hall wrote:
> >
> > A caret as the first charachter in a class is a negation.
> > So this [^\s]+ means match one or more of any char that
> > isn't whitespace.
> >
>
> Ok, so the context of metas change within a class. That makes sense,
> but I'm unclear on th
On 03/16/2005-12:12PM, Mike Hall wrote:
> I'm having trouble getting re to stop matching after it's consumed
> what I want it to. Using this string as an example, the goal is to
> match "CAPS":
>
> >>> s = "only the word in CAPS should be matched"
>
jet% python
Python 2.4 (#2, Jan 5 2005,