Add a replace('\\','\\\\') right before regex processing to preserve correct number of backslashes in the original docstring.
I also trimmed trailing white spaces, and added a few more comments to main. Eventually I hope to delete main, make this a module, and something simple to import.
Add a
replace('\\','\\\\')
right before regex processing to preserve correct number of backslashes in the original docstring.I also trimmed trailing white spaces, and added a few more comments to main. Eventually I hope to delete main, make this a module, and something simple to import.