This is only one line, I have thousand in a file http://img6a.flixcart.com//image/mobile/z/r/j/micromax-bling-q55-bling-limited-iifa-edition-400x400-imadfebcbg7yzrmh.jpeg,http://img5a.flixcart.com//image/mobile/z/r/j/micromax-bling-q55-bling-limited-iifa-edition-75x75-imadfebcbg7yzrmh.jpeg
-
2I get a 404 on your image. Have you tried macros? Your question is very vague. ——— actually, I see what you're getting at. Use a macro. – Wai Ha Lee May 05 '15 at 19:08
-
How the frak does this nonsense get upvotes? I do not get it. Some of you people just upvote for fun I swear – Lightness Races in Orbit May 06 '15 at 02:44
2 Answers
Input:
http://img6a.flixcart.com//image/mobile/z/r/j/micromax-bling-q55-bling-limited-iifa-edition-400x400-imadfebcbg7yzrmh.jpeg,http://img5a.flixcart.com//image/mobile/z/r/j/micromax-bling-q55-bling-limited-iifa-edition-75x75-imadfebcbg7yzrmh.jpeg
Find and replace in regex mode:
Find what: ^(.*?jpeg).*$
Replace with: \1
Result:
http://img6a.flixcart.com//image/mobile/z/r/j/micromax-bling-q55-bling-limited-iifa-edition-400x400-imadfebcbg7yzrmh.jpeg
Explanation:
^ Start of string
(.*?jpeg) Everything until first jpeg, stored in group \1
.* followed by any number of characters
$ end of line

- 22,696
- 11
- 72
- 104
Here is what I would do, using a macro:
You have a thousand lines of the form
http://www.alice.com/bob.jpeg;http://www.wolf.com/rabbit.jpeg
which you would like to turn into
http://www.alice.com/bob.jpeg
by deleting everything after the first instance of ".jpeg".
- Back the file up.
- Open the file in Notepad++ (obviously).
- Go to the
Macro -> Start recording
menu item. - Go to the
Find
dialog by pressing Ctrl+f. - Make sure that the settings are:
- Match whole word only: unchecked;
- Match Case: unchecked;
- Wrap Around: unchecked;
- Search Mode: 'Normal';
- Direction: Down.
- Enter ".jpeg" and press Enter. This will select the next instance of
.jpeg
after the cursor. - Press Escape. This will dismiss the "Find" window.
- Press Right. This will clear the selection and move the cursor to after the
.jpeg
. - Press Shift+End. This will select the rest of the line after the
.jpeg
. - Press Delete to delete the selection.
- Press Right to move the cursor to the start of the next line.
- Go to the
Macro -> Stop recording
menu item.
At this point, the macro is set up and should will be ready to use.
Go to the Macro -> Playback
menu item to test it on the next line.
If that works as you expect, try the Macro -> Run a macro multiple times
menu item and try to run it a few times (be cautious to start with, say, five times).
If, at this point, the result is as you expect, you're good to go! Enter a larger number in the Run a macro multiple times
menu item to get close to the end of the file, then use the Playback
item (or press Ctrl+Shift+P) to do the last few ones.

- 8,598
- 83
- 57
- 92