Hi,

i have some trouble to split a pattern like s.   Even have this
problems with the first and last match. Some greedy problems?

Thanks in advance
Christian

import re

s='v1=pattern1&v2=pattern2&v3=pattern3&v4=pattern4&v5=pattern5&x1=patternx'
pattern =r'(?=[a-z0-9]+=)(.*?)(?<=&)'
regex = re.compile(pattern,re.IGNORECASE)
for match in regex.finditer(s):
        print  match.group(1)

My intention:
pattern1
pattern2
pattern3
pattern4
pattern5
patternx
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to