Regex questions

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Martin
Posts: 4
Joined: Tue Jun 01, 2004 7:45 am

Regex questions

Post 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!
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Search for

Code: Select all

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

Code: Select all

$1Whatever you want to put at the end
Martin
Posts: 4
Joined: Tue Jun 01, 2004 7:45 am

Post by Martin »

Works! Thanks a lot!
Post Reply