简体   繁体   中英

Notepad++ Search And Replace Multiple Text Lines

Notepad++ Search And Replace Multiple Text Lines

Example:

http://stackoverflow.com/123/xxxr423f3
http://stackoverflow.com/124/frwefr/4324324
http://stackoverflow.com/125/fwerf655446/432/4343
http://stackoverflow.com/140/fdsfdswfds

I only need http://stackoverflow.com/and numbers/

like

http://stackoverflow.com/123/
http://stackoverflow.com/124/
http://stackoverflow.com/125/
http://stackoverflow.com/140/

Thanks :)

Please try this if it works:

Find: https://stackoverflow.com/ ((\\d+)/).+

Replace: https://stackoverflow.com/ \\1

You can use the Regular Expression search mode and search with a regular expression; something like this:

(http:\\/\\/stackoverflow\\.com\\/\\d+\\/).*?$

Replace with \\1 . Which means it will keep whatever is in the parentheses. .*?$ means to find any number of characters afterwards (until the end of the line), and remove them. Maybe this isn't exactly what you intend, but this should point you in the right direction. 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM