A file has lines like:
$ cat build-log.txt
2018-02-23T10:08:52.856946Z|cov-internal-capture|6812|info|> EXECUTING: "C:\ghs\comp_201416\asarm.exe" -elf -b0 [ skip ]
I spent an hour or more trying to find out how to set the Python re.search pattern. It all ended up with (the goal was just to extract the compiler name, 'asarm' in this instance)
m = re.search('C:\\\\ghs\\\\comp_201416\\\\([a-z]*)\\.exe', line)
in the Python code which works (at least m.group(1) gives 'asarm' )
Please explain why the four backslashes is needed to quote just one in the file?
Using
Python 2.7
Mac OS X High Sierra
Elpy
GNU Emacs 25.3.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
[ https://emacsformacosx.com ]