fork download
  1. import re
  2. arr = re.findall("-(.*?)<(.*?)>", "-user <username> -id <userid> -sub <subname>")
  3.  
  4. for x in arr:
  5. print "\"" + x[0].strip() + "\" : ", x[1].strip()
Success #stdin #stdout 0.01s 9016KB
stdin
Standard input is empty
stdout
"user" :  username
"id" :  userid
"sub" :  subname