I have a long line like this below in Python:
patterns = re.compile(r'(^/afs|^/pkg|^/bin|^/dev|^/etc|^/usr|^/usr2|^/sys|^/sbin|^/proc)')
And then I tried and changed it to this format below. However, it does not work as expected anymore:
patterns = re.compile(r'(^/afs|\
                         ^/pkg|\
                         ^/bin|\
                         ^/dev|\
                         ^/etc|\
                         ^/usr|\
                         ^/usr2|\
                         ^/sys|\
                         ^/sbin|\
                         ^/proc)')
I know Python is using indentation for syntax so probably this format would not work maybe? or is there a right way to format this in Python if there is?