Skip to content

Commit

Permalink
Only remove ICE if it's not part of a word
Browse files Browse the repository at this point in the history
Avoids turning "Fabrice" into "Fabr"
  • Loading branch information
agateau committed Apr 2, 2017
1 parent 0a1a248 commit a186199
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vcardlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# pre-compile regex
REGEX_ANYTHING_BETWEEN_PARENTHESES_OR_BRACES = re.compile(' *(\([^)]*\)|\[[^]]*\]) *')
REGEX_ANYTHING_BUT_INDEX = re.compile('(.*)\([0-9]+\)$')
REGEX_ICE = re.compile(' *(ICE[0-9]*) *', re.IGNORECASE)
REGEX_ICE = re.compile(r'\b(ICE[0-9]*)\b', re.IGNORECASE)
REGEX_ANY_DASH_OR_UNDERSCORE = re.compile('[_-]')
REGEX_ANY_NUMBER = re.compile('[0-9]')
REGEX_WITHOUT_EXTENSION = re.compile('(.+)\.[a-zA-Z]+$')
Expand Down

0 comments on commit a186199

Please sign in to comment.