Find and delete <p></p>line in HTML
-
I have code similar to this in 1600 files:
<p>Return to <a href="syn-alonzo.htm">Top of Page</a>.</p>
I need to find all lines starting with
<p>Return to
and ending in
</p>
and delete them (i.e., replace with nothing).
I have tried out dozens of examples and samples from everywhere, but cannot figure out to escape the <p>. It’s embarrassing, but I am out of time and would really appreciate some help. -
@jackdeland said in Find and delete <p></p>line in HTML:
I have tried out dozens of examples and samples from everywhere
And yet you didn’t show us any of what you tried… we could have explained why those didn’t work, and thus you would have learned something from it. Instead, I just have to toss you a fish, and hope that’s sufficient for you to learn how to fish on your own. Good luck.
FIND =
(?-s)<p>Return to.*</p>\R
REPLACE = (leave input empty)
SEARCH MODE = regular expression----
Useful References
-
Do you really want approx. 60 permutations and slapdash tries at everything? I am working 4 deadlines currently and don’t have anymore time to learn all I need. I have only twice asked for help in a forum with others far beyond my tech proficiency in one area, and I see I am dealing with some very insecure people. SO glad I am not in your world.
-
Do you really want approx. 60 permutations and slapdash tries at everything?
No. I just want you to show that you are putting in effort, and not just demanding that we do your job for you.
I am working 4 deadlines currently and don’t have anymore time to learn all I need.
That is unfortunate for you.
You do understand that I am just a fellow user of Notepad++, who is here out of the kindness of my heart to help fellow users of Notepad++. I am not paid to help you; no one here is.
The reason I suggest “showing what you tried” is because when people don’t, it tends to mean that they didn’t actually try anything themselves, or didn’t understand what they were trying.
I handed you the free answer right away, even though I also suggested that showing more effort would be helpful to you.
I see I am dealing with some very insecure people.
That’s rather rude, considering I gave you the answer.
----
Please note: This Community Forum is not a data transformation service; you should not expect to be able to always say “I have data like X and want it to look like Y” and have us do all the work for you. If you are new to the Forum, and new to regular expressions, we will often give help on the first one or two data-transformation questions, especially if they are well-asked and you show a willingness to learn; and we will point you to the documentation where you can learn how to do the data transformations for yourself in the future. But if you repeatedly ask us to do your work for you, you will find that the patience of usually-helpful Community members wears thin. The best way to learn regular expressions is by experimenting with them yourself, and getting a feel for how they work; having us spoon-feed you the answers without you putting in the effort doesn’t help you in the long term and is uninteresting and annoying for us.
-
Please do not delete posts or topics after replies have been given. Your post has been restored.
-
@jackdeland said in Find and delete <p></p>line in HTML:
Do you really want approx. 60 permutations and slapdash tries at everything? I am working 4 deadlines currently and don’t have anymore time to learn all I need. I have only twice asked for help in a forum with others far beyond my tech proficiency in one area, and I see I am dealing with some very insecure people. SO glad I am not in your world.
Wow. Seriously.
Since the answer was provided before that rant was typed, paraphrasing it, I think it reads “Thank you Peter Jones for the kindly help”.