I'm not very good with regular expressions but in Textmate, I'm trying to clear out some multi-lines in an XML file that looks like
<comments>
<sub_node>....
....
</comments>
and I'm using this in the find/replace with regex,
<comments>(?m:.*)</comments>
There're multiple occurences of the above, but if I do a find, it finds the first and then selects everything in between including outside nodes till the last in the file.
If I do a find previous (backwards) from the last line it captures a block correctly. I'm not sure what I'm doing wrong here and if anyone might even suggest a far more efficient way of doing this.
Thanks.