I have this HTML code (just an example):
Sem vestibulum blandit nostra, nullam imperdiet, pellentesque vel wisi sit fusce purus mi, porttitor lorem. Bibendum non phasellus ut ipsum massa sed, interdum per, facilisis facilis luctus fermentum et donec, tristique tristique non.</p>
<p align="justify"><a class="nemo" href="http://myserver.com/images/blogs/65/emo_by_bebz.jpg"><img style="max-width:256px; max-height:256px" src="http://myserver.com/images/blogs/65/emo_by_bebz_thumb.jpg" alt="" /></a></p>
<p align="justify">Ante sed pede adipiscing morbi, ut aliquam orci, nunc tempus lectus suspendisse, sem at sit ullamcorper augue.
and i want to replace all <a class="nemo" ... </a>
width this: {image src=emo_by_bebz_thumb.jpg} using javascript and a regular expresion. As a starting point i have this regex:
<a class=\"nemo\"[^>]*>(.*?)src="(.*?)"[^>]*></a>
it works, but $2 gives me only the full image path and i only want the filename. Any ideas??
thanks in advance,