I need to replace picture links inside strings like this example :
blabla http://img146.imagesha ck.us/img126/6348/anything.jpg blabla
for
blabla [img:http://img146.imagesha ck.us/img126/6348/anything.jpg] blabla
I can found them with this regex without problems : ((http(s?):)|([/|.|\w|\s])*\.(?:jpg|gif| png)
My actual replace is : [img:$&]
I didn't find a way to put my last bracket at the very end of my url with my replace.
Thanks for your help
blabla http://img146.imagesha ck.us/img126/6348/anything.jpg blabla
for
blabla [img:http://img146.imagesha ck.us/img126/6348/anything.jpg] blabla
I can found them with this regex without problems : ((http(s?):)|([/|.|\w|\s])*\.(?:jpg|gif| png)
My actual replace is : [img:$&]
I didn't find a way to put my last bracket at the very end of my url with my replace.
Thanks for your help
Comment