When converting your regex to re.VERBOSE mode make sure that:
whitespace is escaped or replaced with some equivalent: \s or [ ] or '\ '(I had to put ‘’ here due to SO formatting). All plain whitespace is ignored with re.VERBOSE.
hashes # are escaped or replaced the same way: #, etc. Hashes work as commenting means with re.VERBOSE.
Then you can rewrite your regex using python’s multiline strings.
将正则表达式转换为re.VERBOSE模式时,请确保:空格被转义或替换为等效项,#可以用相同的方式转义或替换。
https://stackoverflow.com/questions/49951620/using-re-verbose-on-a-regular-expression