3
I have the following string
with the html
:
teste = "<img src="image/teste.jpg" alt="" width="32" height="32">
<p>teste</p>
<img src="image/teste2.jpg" alt="" width="132" height="132">";
I would like a regular expression that removes the attributes, leaving only the src
and adding to the content of src
a domain of all the images in the string, thus:
teste = "<img src="http://meudominio.com/image/teste.jpg">
<p>teste</p>
<img src="http://meudominio.com/image/teste2.jpg">";
Remembering that this string
will not always come in that order, someone has some idea of how to do?
interesting. intelligent solution
– Daniel Omine