How to extract error detail from traceback by using python regex?
问题 I want to extract error detail from traceback, those tracebacks are extract from log file by using this method, and there are many different kinds of tracebacks, like below: Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/root/env/common/test/test/__main__.py", line 5, in <module> main() File "/root/env/common