RegEx problems forum (archived)
-
funbird
- Posts: 1
- Joined: Wed Jan 27, 2016 2:12 pm
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
-
DigitalVolcano
- Site Admin
- Posts: 1863
- Joined: Thu Jun 09, 2011 10:04 am
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.