Hi again dear comminity!
To make it short, I have a textbox, where you can paste <img> tags, which look like this:
<img src="123.jpg" />.
Is there any way to make these <img> look this: <img src="img/upload/username/123.jpg" /> using jQuery .replace() or something like this ? Or should I use PHP function instead ?
I have tried to find out what jQuery .match() returns for some regual expression:
x = text.match(/\<img src="(.*)" \/>\$/);
alert(x);
,but it returns odd things, when there are more than one <img> tag.
Thank you for your help!
Not tested…
If you would like to do this on server side with PHP you can just replace like this, no need for regex…
Or if you would like to use regexp…