fork(17) download
  1. import re
  2.  
  3. str = 'color-purple, designer-allison_parris, formality-6, sizescale-us_combined, type-dress'
  4. match = re.search(r'.*?color-(\w+).*', str)
  5.  
  6. if match:
  7. print match.group(1)
Success #stdin #stdout 0.03s 44680KB
stdin
Standard input is empty
stdout
purple