More Regexp help please.

SA sarmstrong13 at mac.com
Mon Aug 12 22:24:23 EDT 2002


Hi Everyone-

I am trying to match a string pattern like the following:

?1234.htm

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:

?1234.htm
?342.htm
?098.htm


Anyone know how to do this? Is there a simpler way than re?

Thanks.
SA


-- 
"I can do everything on my Mac I used to on my PC. Plus a lot more ..."
-Me




More information about the Python-list mailing list