matching patterns after regex?
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Wed Aug 12 08:23:25 EDT 2009
On Wed, 12 Aug 2009 05:12:22 -0700, Martin wrote:
> I tried
>
> re.findall((\w+COORDINATE).*\s+VALUE\s+=\s([\d\.\w-]+),s)
You need to put quotes around strings.
In this case, because you're using regular expressions, you should use a
raw string:
re.findall(r"(\w+COORDINATE).*\s+VALUE\s+=\s([\d\.\w-]+)",s)
will probably work.
--
Steven
More information about the Python-list
mailing list