Notepad++ wildcard

后端 未结 4 848
被撕碎了的回忆
被撕碎了的回忆 2021-02-08 01:17

how to find and replace all characters after the main domain (including the \"/\" character) using a wild card?

For example, i have the following 4 rows:



        
4条回答
  •  南方客
    南方客 (楼主)
    2021-02-08 01:42

    Search -> Replace. In the Find what box, enter the following Regex:

    /.*$
    

    In the Replace with box, enter nothing. Make sure Search Mode is set to Regular expression. Then Find Next/Replace or Replace All as you see fit.

    How it works:

    / matches /, ensuring we start from the / after the domain name.
    .* matches any character any number of times.
    $ anchors the match to the end of the line.

    In summary, this regex looks for / followed by any number of characters, all the way to the end of the line.

提交回复
热议问题