import rem = re.match('(www)-(ddd)', 'abc-123')m.group() # entire matchm.group(1) # subgroup 1m.group(2) # subgroup 2m.groups() # all subgroupsm = re.match('ab', 'ab') # no subgroupsm.group() # entire matchm.groups() # all subgroupsm = re.match('(ab)', 'ab') # one subgroupm.group() # entire matchm.group(1) # subgroup 1m.groups() # all subgroupsm = re.match('(a)(b)', 'ab') # two subgroupsm.group() # entire matchm.group(1) # subgroup 1m.group(2) # subgroup 2m.groups() # all subgroupsm = re.match('(a(b))', 'ab') # two subgroupsm.group() # entire matchm.group(1) # subgroup 1m.group(2) # subgroup 2m.groups() # all subgroups
Name (required)
email (will not be published) (required)
Website