Hello,

How can I split the data in a line by a single whitespace but also keep
portions between quotes together?  Here is an example of a line of data I'm
trying to parse:

id=firewall time="2003-10-30 04:15:01" fw=66.74.67.229 pri=5 c=256 m=38
msg="ICMP packet dropped" n=63211 src=1.1.1.1 dst=2.2.2.2

What I would like to do is keep the data between the quotes together despite
the spaces.  This is what I'm expecting to get:

Id=firewall
Time="2003-10-30 04:15:01"
Fw=66.74.67.229
Msg="ICMP packet dropped"
...etc

How should I go about doing this?  What I have currently is a regex that
splits out the entire line, but certain fields have changed so my original
code doesn't work as well.

Thank you very much!

Joshua Scott

==============================================================================
NOTICE - This communication may contain confidential and privileged 
information that is for the sole use of the intended recipient. Any viewing,
copying or distribution of, or reliance on this message by unintended
recipients is strictly prohibited. If you have received this message in
error, please notify us immediately by replying to the message and deleting
it from your computer.

==============================================================================

Reply via email to