Simple-as-possible regular expression to fix unquoted html/xhtml width/height attributes: find: (width|height)=([\d]+) replace: $1="$2" Example result: find: <img src="myimage.png" height=20 width=200 /> replace: <img src="myimage.png" height="20" width="200" />