/ Published in: Regular Expression

Use this regex search in Dreamweaver's find/replace to remove any html tag attributes
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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 will be reduced to --------- actually you could remove any tag attribute by replacing the 'style' with the name of the attribute you want to remove
Comments
