I have a problem when using RE module in python:
import re
url='http://list.xxx.com/0-20356-1-0-0-0-0-0-0-0-269036.html'
re_rule=re.compile('.+20356\-(\d{1,3})-0-0-0.+')
new_url=re_rule.sub('2 \1')
As I wish, the new_url would be 'http://list.xxx.com/0-20356-2-0-0-0-0-0-0-0-269036.html', but python returns new_url=2.
I know I had make mistakes when using re module. Which mistakes had I make and how to correct them?