Z
Z
ZeroMan2020-03-02 08:00:05
Notepad++
ZeroMan, 2020-03-02 08:00:05

How to remove a word from lines containing site directories using Notepad ++?

Can you tell me the expression regulator that will convert and remove the extra from the line?
Example :
https://www.foodclub.ru/recipes/
https://www.tveda.ru/recepty/
https://www.gotovim.ru/recepts/
https://1000.menu/cooking

delete all directories and only the main ones:

https://www.foodclub.ru/
https://www.tveda.ru/
https://www.gotovim.ru/
https://1000.menu/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
js-newbie, 2020-03-02
@ZeroMan0

Search:
(http(s)*:[/]{2}[^/]*[/]{1})\S*
Replacement:
\1

N
noytmant, 2020-03-02
@noytmant

I do not think that there is some kind of magic phrase that replaces words.
If it were possible, then there would be no problem replacing "/magicnoe_slovo/" with " ".
And so, manually, maybe somewhere the same word will be written 5 times with 1 click to demolish and you're done

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question