Delete Form code inside HTML

A place to try and solve your RegEx problems.
Post Reply
funbird
Posts: 1
Joined: Wed Jan 27, 2016 2:12 pm

Delete Form code inside HTML

Post by funbird »

Hi guys,

I despair.

I have to delete same FORM code in nearly 500 HTML files.

Example

Code: Select all

<form method="post" name="newFeedback" id="commentFeedback" action="">
.
.
</form>

<form method="post" name="newComment" id="commentForm" action="">
.
.
</form>

<form method="post" name="newOrder" id="commentOrder" action="">
.
.
</form>

The difficulty is only delete the FORM Code "newComment" and keep the other code.

Any idea ?

Greeting
Kai
User avatar
DigitalVolcano
Site Admin
Posts: 1379
Joined: Thu Jun 09, 2011 10:04 am

Re: Delete Form code inside HTML

Post by DigitalVolcano »

This regular expression just selects the newComment form - is this what you want?

Code: Select all

<form method="post" name="newComment" id="commentForm" action="">.*?</form>
Option = "Dot matches Newline"

you can then replace with nothing.
Post Reply