One thing I am wondering, I wanted to complicate it a bit more, I want to do something different for each second line! Can either of these ways skip lines or do something different on each line, please tell me if either can?
eg I have 2 links for each picture- 1st is large, second is small version. And I want this to happen.
HTTP.://IMG.1.LARGE.jpg
HTTP.://IMG.1.SMALL.jpg
HTTP.://IMG.2.LARGE.jpg
HTTP.://IMG.2.SMALL.jpg
<a href="HTTP.://IMG.1.LARGE.jpg" target="_blank">
<img src="HTTP.://IMG.1.SMALL.jpg"/></a>
<a href="HTTP.://IMG.2.LARGE.jpg" target="_blank">
<img src="HTTP.://IMG.2.SMALL.jpg"/></a>
Then I can just join each second line with the line before it. I found a vbs script to that.
-flowowery
Assuming that the thumbnail doesn't have the same name as the full size, (which logically it won't), just run two RegEx search/replace operations:
Search: ^(.+LARGE\.jpg)$
Replace: <a href="\1" target="_blank">
followed by:
Search: ^(.+SMALL\.jpg)$
Replace: <img src="\1"/></a>
NOTE: I'm only doing this in Notepad2-Mod, which only allows single line RegEx - other editors may allow multi-line RegEx in which case it could probably all be done in one RegEx operation, including the joining of the lines.
If the thumbnails were all the same size then conceivably you wouldn't need the ...SMALL... lines in the file at all, you just specify the height/width attributes of the img tag.
eg.
Search: ^(.+LARGE\.jpg)$
Replace: <a href="\1" target="_blank"><img src="\1" height="42" width="42"/></a>
BAD: It means all the large images get loaded at once.
GOOD: Faster display when you click on a thumbnail since the images are already loaded.
BTW, you need to put URL stuff into a CODE box sometimes, the forum software sees
and thinks it's a link and replaces it with [/URL].