--0-836433923-1056400575767
Content-Type: text/plain; charset=us-ascii

Take a look about String.scan, be careful the grouping.
Here is my suggestion ( I am sure someone will have better solution), but at least, it works.
 
Example:
 
str  <EOF
foo "foobar"
bar "foo" "bar";
fob "foo \"bar\"";
EOF
 
str.each_line{ |line|
  p line.scan(/"(?:[^"]|\\")+"/).collect! {|e| e.sub!(/^"(.*)"$/, '\1')}
}

The first regexp, take out the grouping by using (?: ... )
The sub! take out the begin and end quote.
 
Dave

Patrick Zesar <jonnypichler / gmx.net> wrote:

i thought about something like: /"([^"]|\\")+"/




---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
--0-836433923-1056400575767
Content-Type: text/html; charset=us-ascii

<DIV>Take a look about String.scan, be careful the grouping.</DIV>
<DIV>Here is my suggestion ( I am sure someone will have better solution), but at least, it works.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Example:</DIV>
<DIV>&nbsp;</DIV>
<DIV>str  lt;&lt;EOF<BR>foo "foobar"<BR>bar "foo" "bar";<BR>fob "foo \"bar\"";<BR>EOF</DIV>
<DIV>&nbsp;</DIV>
<DIV>str.each_line{ |line|<BR>&nbsp; p line.scan(/"(?:[^"]|\\")+"/).collect! {|e| e.sub!(/^"(.*)"$/, '\1')}<BR>}<BR></DIV>
<DIV>The first regexp, take out the grouping by using (?: ... )</DIV>
<DIV>The&nbsp;sub! take out the begin and end quote.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Dave<BR><BR><B><I>Patrick Zesar &lt;jonnypichler / gmx.net&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE styleADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>i thought about something like: /"([^"]|\\")+"/<BR><BR><BR></BLOCKQUOTE><p><hr SIZE
Do you Yahoo!?<br>
<a hrefttp://pa.yahoo.com/*http://rd.yahoo.com/evt07/*http://promo.yahoo.com/sbc/">SBC Yahoo! DSL</a> - Now only $29.95 per month!
--0-836433923-1056400575767--