12/08/2020

Regular expression tricks

 # Match a sentence that starts with either word

 pattern = re.compile(r'^(?:DW_API_PUBLIC|DW_VIZ_API_PUBLIC).*?;', re.DOTALL | re.MULTILINE)

No comments: