View Single Post
Old 02-21-2012, 02:52 PM   #2
rjgrigaitis
Junior Member
rjgrigaitis began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2012
Device: Sony PRS-350
I'm new to Python, so there may be a better way to do this. However, this is how I would do it:

Code:
parts = re.match(r"(?P<begin>http://www.elnuevoherald.com/\d+/\d+/\d+)(?P<end>/\d+/.+\.html)", feed)
feed = parts.group('begin') + "/v-print" + parts.group('end')
rjgrigaitis is offline   Reply With Quote