More Regexp help please.
John La Rooy
igetenoughspamalreadythanksjlr at doctor.com
Mon Aug 12 17:27:52 CEST 2002
> Hi Everyone-
> I am trying to match a string pattern like the following:
> I would then like to extract the 1234 from the pattern and sub 1234.html for
> the pattern. Of course there will be more than one match per file and 1234
> will be variable from match to match. But the ? And .htm will be in each
> pattern. For example:
> Anyone know how to do this? Is there a simpler way than re?
This should get you started
\? matches the ?
(\d+) matches 1 or more digits and is substituted for the \\1
More information about the Python-list