Search code examples
notepad++

notepad++ remove certain URL's


I have txt file containing multiple URL's, in format:

url1 url2
url3 url4
url5 url6
...and so on

How can i remove ALL the urls on right side? I tried replacing space with \n character but that did nothing.. I probably did it wrong?

Thanks.


Solution

  • Using the Regular expression for Search Mode, you can find http:((?!http\:).)*$ and replace it with nothing, it works perfectly for me:

    enter image description here

    It will match any text that start with http: and does not contain http: in the middle and the detected part should be at the end of a line.