From: Robert Dober Date: 2006-05-24T05:20:03+09:00 Subject: Re: Regexp help: Matching HTML having trouble w/greediness ------=_Part_163697_12699380.1148415599479 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 5/23/06, Wes Gamble wrote: > > Robert Dober wrote: > > On 5/23/06, Wes Gamble wrote: > >> > substitution that I'm doing. > >> > other stuff, including tags >> > Wes > >> > >> -- > >> Posted via http://www.ruby-forum.com/. > >> > >> > > So I was just typing and typing and typing... > > Glad Ur happy with it. > > Robert > > > > > > -- > > Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qu= i > > concerne l'univers, je n'en ai pas acquis la certitude absolue. > > > > - Albert Einstein > > Robert, > > I am pretty sure that it's illegal to put a ">" in an HTML attribute Well than you might be flying with your solution. (you would achieve the desired affect with >). > > I agree that perhaps regexen are not the best way to manipulate this - > however, I've already been down the path of using a HTML parser > (RubyfulSoup/htmltools) and trying to output the resulting parse tree. > Unfortunately, that parser attempts to "fix" the HTML for me and when I > attempt to render the fixed HTML in a browser, it is "too fixed" for the > browser to handle. Not surprised :( So unfortunately, I'm forced to accept what I get and only change it so > that I don't break any existing stuff. > > Hence, I'm using regexen to do my write - manipulation. I was not thinking about throwing them away altogether ;) but maybe scannin= g from one attribute to another inside a tag. But thinling about me personal expirence sometimes I got threw with grep! Thanks for the help though! Well you found out for yourself ;) Wes > > -- > Posted via http://www.ruby-forum.com/. Cheers Robert --=20 Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_163697_12699380.1148415599479--