Is this actually doable? I have some very long regex pattern rules that are hard to understand because they don\'t fit into the screen at once. Example:
test
You can split your regex pattern by quoting each segment. No backslashes needed.
test = re.compile(('(?P.+):\d+:\s+warning:\s+Member'
'\s+(?P.+)\s+\((?P%s)\) '
'of (class|group|namespace)\s+(?P.+)'
'\s+is not documented') % (self.__MEMBER_TYPES), re.IGNORECASE)
You can also use the raw string flag 'r' and you'll have to put it before each segment.
See the docs.