[Ruby] regex question

shaners becker veganstraightedge at gmail.com
Mon Feb 12 16:08:15 PST 2007


nope.


On Feb 12, 2007, at 4:06 PM, Laurel Fan wrote:

> On 2/12/07, shaners becker <veganstraightedge at gmail.com> wrote:
>> i'm in textmate, i've got some xml that i want to simplify. i should
>> be able to do just that with some find and replace, right? so here's
>> a shortened sample of what i have, in case that matters.
> [snip]
>>
>> so... i tried both:
>>
>> /<recommendations>[^<]*<\/recommendations>/
>> /<recommendations>.*?<\/recommendations >/
>>
>> neither of them found any results.
>
> I'm not familar with textmate, but do you need to add an option to
> match multiple lines?  Maybe the m option at the end, eg:
>
> /<recommendations>.*?<\/recommendations >/m
>
> -- 
> Laurel Fan
> http://blog.gorgorg.org
> _______________________________________________
> Ruby at zenspider.com - Seattle.rb non-commercial list
> http://www.zenspider.com/seattle.rb
> http://www.zenspider.com/mailman/listinfo/ruby




-----------
join the resistance. fall in love.
http://theresistancearmy.com/




More information about the Ruby mailing list