search – RegEx – How to Add Anything After Selected Characters

I am trying to add rel="nofollow noopener" target="_blank" to all the links in HTML.

Here’s the example HTML code:

<li><a href="https://somewebsite.com/">Some website</a></li>
<li><a href="https://awesomewebsite.net/">Awesome Website</a></li>
<li><a href="https://coolwebsite.org/">Cool Website</a></li>

<p>Also <a href="https://badsite.com/">check this website</a></p>! 

I know nothing about RegEx but after reading some resources I have written

href([^>]*)

Which selects all the links but I’m not sure how would I add rel=”nofollow noopener” target=”_blank” in Notepad++ after what I’ve selected 🙂

I am trying to add rel=”nofollow noopener” target=”_blank” to all the links with RegEx

Read more here: Source link