Oke, first wrap -up for those behind me
You can replace pictures on the forum with [img]http://www.mydomain.com/media/<pictureID>[/img]
I used a couple of expressions to search and replace the different formats on our forum to the new one.
So first used format on our forum:
[img]http://www.mydomain.com/forums/members/<username>-albums-algemeen-picture63526-a1.jpg[/img]
replaced by:
[img]http://www.mydomain.com/media/63526/full[/img]
(numbers are just a example to make it clear)
Used the following:
Quick Find:
Code:
quick find: http://www.mydomain.com/forums/members/
Regular expression:
Code:
#\[img]http:\/\/www\.mydomain\.com\/forums\/members\/([a-z0-9%_-]+)picture([0-9]+)([a-z0-9%_-]+)([.a-z]+)\[\/img]#siu
(Later added % in regex to replace special characters in member names and picture names)
Replacement String:
Code:
[IMG]www.mydomain.com/media/\2/full[/img]
Second format used on our forum to show pictures was something like this:
[IMG]http://www.mydomain.com/forums/picture.php?albumid=19413&pictureid=194237[/IMG]
Also replaced by:
[img]http://www.mydomain.com/media/194237/full[/img]
(numbers are just a example to make it clear)
For this I used the following:
Quick Find:
Code:
http://www.mydomain.com/forums/picture.php?albumid=
Regular Expression:
Code:
#\[img]http:\/\/www\.mydomain\.com\/forums\/picture\.php\?([albumid\=0-9]+)([\&pictureid\=]+)([0-9]+)\[\/img]#siu
Replacement String:
Code:
[IMG]www.mydomain.com/media/\3/full[/img]
For sure that the specialists here have some comments and perhaps will correct some errors in my regex but this did the trick for me. Needed some passes to allow the S&R tool to correct all the pictures in the postings (over 3 million posts) Off course adjusted the tool to allow max 5000 results at a time.
Replaced all our pictures after migrating from Vb3.8 to XF 1.5.
Now my next challenge is to replace all the internal links to other topics in the forum. Can use some help as my limited knowledge of regex doesn't help me here

.
Hope I didn't made too much typo's

Thanks for reading and hope this will help someone out.