Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you are comparing the match to the wanted string, it defeats the purpose of the capture group.

  if "tarzan" == re.search(r'"tarzan"|tarzan', myvar)[0]:
      ...
Am I missing something?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: