EktorCaba avatar

I need to replace all url in string...

ektorcaba

Published: 21 Jun 2018 › Updated: 21 Jun 2018

I need to replace all url in string...

Hi,

I need to replace in javascript regex, all url in string outside any html tags and which include the domain "steemitimages.com".

I have this string:

http://google.com/ and a sister which is also a kitten http://s3.amazonaws.com/rapgenius/filepicker%2FvCleswcKTpuRXKptjOPo_kitten.jpg and lots of kittens
http://s3.amazonaws.com/rapgenius/filepicker%2FvCleswcKTpuRXKptjOPo_kitten.jpg  http://s3.amazonaws.com/rapgenius/filepicker%2FvCleswcKTpuRXKptjOPo_kitten.jpg
http://s3.amazonaws.com/rapgenius/filepicker%2FvCleswcKTpuRXKptjOPo_kitten.jpg
http://s3.amazonaws.com/rapgenius/filepicker%2FvCleswcKTpuRXKptjOPo_kitten.jpg https://steemitimages.com/0x0/https://steemitimages.com/0x0/https://gateway.ipfs.io/ipfs/QmWqwTSacujoQ9ZCSsLmDjo3ER61oZpe9jeCGRsyXbu11S

and i need to to get only the links from https://steemitimages.com/0x0 if the url reside outside a img tag.

I want to replace al url strings from this to img tag if this are not ready in one.

can help me?

Thank you

Leave I need to replace all url in string... to:

Written by

Hi! i'm Ektor Caba from Canary Islands (Spain). I love play FPS coop games, vfx, 3D, music, develop...[SPM Enabled]

Read more #steemcodeit posts


Best Posts From EktorCaba

We have not curated any of ektorcaba's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From EktorCaba