html - Regex for setting <img> src replaced with specific name -
i have image tags in form of
<img src="cid:imgname@01cab53f.69bab010"/>
here 01cab53f.69bab010 change dynamically...i want ignore things whatever comes after imgname.
i want replace with
<img src="imgname"/>
if , if image take comes in specified format..
i searched here , couldnt exact thing need. new regex.
i using openpop mails. when reading mails, images rendered in specified format. have store image , replace storedname.
can please me?
this regex match img tag followed src attribute
(<img src=")[^"]+("/>)
and replace value imgname ($1 , $2 stands left , right part of img tag) :
$imgname$2
do not forget add flag g (global)
Comments
Post a Comment