Remove the last part of every line in notepad++

If we have the lines:

http://lunar.earth.northwestern.edu/mediawiki/index.php/Limitless_It_the_film_high_quality
http://sportnaslava.info/wiki/index.php?title=User:CisBlakeman861

and we want final lines become like this:

http://lunar.earth.northwestern.edu/mediawiki/index.php
http://sportnaslava.info/wiki/index.php

we can applied notepad++ to do it. The solution as follow:

1) Using notepad++ and go to the search. Please used the regular expression as search mode

2) search

index\.php.*$

index\ means search for word; .* means everything else; $ means the end of line.

3) then replace with

index.php

4) That should find everything after (and including) index.php, and replace it with just index.php.

http://lunar.earth.northwestern.edu/mediawiki/index.php
http://sportnaslava.info/wiki/index.php

References: http://superuser.com/questions/391318/how-do-i-remove-the-last-part-of-every-line-in-notepad

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *