About Including Unicode Characters in Regular Expressions

When including Unicode characters in a regular-expression pattern, pass the re.UNICODE flag to it:

1
2
import re
currency_re = re.compile(r'[$€¥£₨]', re.UNICODE)

Tips and Tricks Programming Development Python 3