1/04/2021

Regular Expression Commonly Used Patterns

# Find a line that starts with DW_API_PUBLIC or DW_VIZ_API_PUBLIC
pattern = re.compile(r'^(?:DW_API_PUBLIC|DW_VIZ_API_PUBLIC).*?;',
                     re.DOTALL | re.MULTILINE)
matches = pattern.findall(self._content) 

No comments: