I want search and remove proprietary tags inside HTML image tag.
I want to remove the following attributes from each IMG tag: data-base-url
, data-linked-resource-default-alias
, data-linked-resource-container-id
, data-image-
, data-linked-resource-id
, and data-linked-resource-type
.
So I'm trying create Regular expression for Notepad++ search, to search this code and remove.
Image code examples:
<img data-base-url="http://doc.webdomain.com" data-image-="" data-linked-resource-container-id="5374312" data-linked-resource-default-alias="fo005-categories.png" data-linked-resource-id="11468806" data-linked-resource-type="attachment" src="http://doc.musicbox.com/download/attachments/5374312/fo005-categories.png?version=1&modificationDate=1344416572000" title="Musicbox 1.9 > Browsing the front-office > fo005-categories.png" />
<img data-base-url="http://doc.webdomain.com" data-image-="" data-linked-resource-container-id="5374312" data-linked-resource-default-alias="fo008-suppliers.png" data-linked-resource-id="11468815" data-linked-resource-type="attachment" src="http://doc.musicbox.com/download/attachments/5374312/fo008-suppliers.png?version=1&modificationDate=1344416588000" title="Musicbox 1.9 > Browsing the front-office > fo008-suppliers.png" />
I want get this image code(with added alt
attribute, and truncated src
attribute value):
<img src="http://doc.musicbox.com/download/attachments/5374312/fo008-suppliers.png" title="" alt="" />
How to write this expression?