From: Chris Morris Date: 2004-01-20T06:44:17+09:00 Subject: Re: regex help Simon Strandgaard wrote: >On Tue, 20 Jan 2004 04:38:12 +0900, Chris Morris wrote: > > > >>I need a re such that: >> >> ' /* comment */ String s = "***/"; '.gsub(re, "*\\") >> >>returns: >> >> ' /* comment *\ String s = "***/"; ' >> >>I want to find all *\ instances that are not enclosed in double-quotes. >>Or is this one of those problems ill-suited for a regex? >> >> > > >possible.. but difficult. > >I spend this evening making some _broken_ experiments. > > I thought it might be. I've fallen back and written a simple char-by-char parser that ignores pieces inside quotes. -- Chris http://clabs.org