Figured it out in case anyone might find it useful, here's the solution:
var feed = feeds.entries[i].content; var parsedFeed = feed.replace(/src=/gi, "tempsrc="); var tmpHolder = document.createElement('div'); tmpHolder.innerHTML=parsedFeed;
I have a string that includes HTML markup with <img src='path.jpg'/>
I want to use a regex on the string to change every src attribute to tmpSrc
so
<img src='path.jpg'/>
would be transformed into
<img tmpSrc='path.jpg'/>
This is specifically for JavaScript
Here's the original issue posted elsewhere but still unresolved:
Browser parse HTML for jQuery without loading resources
How to parse AJAX response without loading resources?
Thanks