ChristopherIMeyers / ATZ-ReplayFlair

http://reddit.com/r/allthingszerg
MIT License
3 stars 2 forks source link

Regex issue for people with clan tags/non-ascii characters #10

Closed ChristopherIMeyers closed 8 years ago

ChristopherIMeyers commented 9 years ago

reported by reddit user whitefenix, non-ascii characters and clan tags are not handled correctly

ChristopherIMeyers commented 9 years ago

existing code: https://github.com/ChristopherIMeyers/ATZ-ReplayFlair/blob/master/funcs.py#L74

def stripOutClan(text):
  return re.search("(\[[A-z0-9]+\]<sp/>)?(.+)",text).group(2)

data breaking code: http://eu.battle.net/sc2/en/profile/1436270/1/whitefenix/

The clan tag contains characters that aren't in the regex group.

ChristopherIMeyers commented 8 years ago

handled at fc174f25fc40f929f2fd79c9126efc0ae9162e36