var html = "<div>
<img src="http://pranaysonisoft.blogspot.com/pranaysoni.jpg" /> <h1>SOME TEXT</h1>
<img src="http://pranaysonisoft.blogspot.com/image2.jpg" />
</div>";
html.replace(/[^-]src\=["|'](.*?)['|"]/g, "SOME_URL");
then all src="..." become src="SOME_URL"
No comments:
Post a Comment