1

I want to replace every occurrence between

<fb:like href= and </fb:like> in notepad++.

I know I can do this with Regex, but i tried for a couple of hours in vain. I have to do this in a large SQL export file.

How can I do this?

  • 5
    search for (?<=fb:like\shref=).*?(?=</fb:like>) - replace with whatever you want – nixda Mar 21 '16 at 12:08
  • 2
    Add this as answer, I can accept it @nixda – Arun Shankar Mar 21 '16 at 12:21
0

Test string <fb:like href=https://regexr.com/46rin>Tag text</fb:like>

Option A)

(?:<fb:like\shref=)(.*?)(?:</fb:like>) yields https://regexr.com/46rin>Tag text

Option B)

(?:<fb:like\shref=.*>)(.*)(?:</fb:like>) yields Tag text

It is not clear to me which one you want exactly.

  • @nixda gives the right answer in comment, yours doesn't explain how you do the replace. – Toto Jan 22 at 12:30
  • @Toto If his answer is right then so is mine. If mine doesn't explain replace, his doesn't either, so be coherent. – harogaston Jan 22 at 20:08
  • @nixda answer and yours are completly different, we can use it for replacing, we can't do such with yours or explain how you do. – Toto Jan 23 at 8:59
  • Hahaha sure man. He explains everything in that one line comment. You know what, you are right and I'm wrong. Enjoy your life. – harogaston Jan 23 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.