If you do not have any (hidden or double) quotes in your quoted strings, you can search
"[^"]*"|\S+
However, quotation marks will be part of the match. The regular expression can be extended to handle quotes inside quoted strings, if necessary.
Another (and in this case preferred) possibility would be to use the csv parser.
For example (Python):
import csv
reader = csv.reader(open('test.txt'), delimiter=' ', quotechar='"')
for row in reader:
print(row)
source
share