/ Published in: Regular Expression
Use this regex search in Dreamweaver's find/replace to remove any html tag attributes
Expand |
Embed | Plain Text
If you find yourself having to grab content off older websites and have to remove inline styles - or worse inline javascript! - use this code in Dreamweaver's find and replace dialog : ---- for style attribute ----- in the Find box : (<[^>]*)style\s*=\s*('|")[^\2]*?\2([^>]*>) in the Replace box : $1$3 so the following <a href="http://www.website.com" style="color:red;">Click here</a> will be reduced to <a href="http://www.website.com" >Click here</a> --------- actually you could remove any tag attribute by replacing the 'style' with the name of the attribute you want to remove
You need to login to post a comment.
