I have a string which is like this:
this is \"a test\"
I\'m trying to write something in Python to split it up by space while ignoring spac
I use shlex.split to process 70,000,000 lines of squid log, it's so slow. So I switched to re.
Please try this, if you have performance problem with shlex.
import re def line_split(line): return re.findall(r'[^"\s]\S*|".+?"', line)