Page 1 of 1

Regex questions

Posted: Tue Jun 01, 2004 8:21 am
by Martin
I want to search for the last occurance of the closing table tag in a html file. The search selection should start with </table> and expand all the way to the end of the file.

...
</tr>
</table>
</table>
Garbage I want to strip.
[EOF]

I tried
</table>.+
as search expression. But this spans the selection from the first </table>-tag to the end of the file.

Does anybody have a suggestion?

Thanks!

Posted: Tue Jun 01, 2004 8:59 am
by ben_josephs
Search for

Code: Select all

(.*)</table>.+
Replace it with

Code: Select all

$1Whatever you want to put at the end

Posted: Tue Jun 01, 2004 9:24 am
by Martin
Works! Thanks a lot!