A while back I offered up a pack of Dreamweaver regular expressions for download. Well, I have been doing some significant front-end work lately which has required quite a bit of rewriting of old HTML to a more standards-centric foundation. During this process, I have been writing a few additional regular expressions (aka regexes). I was somewhat surprised by the level of interest in the original set of regexes so I thought it would be helpful to release an updated collection of regular expressions.

Some of the more useful regexes replace two common depreciated tags (b and i with the suggested replacements for those tags (strong and em). It can be amazingly tiring to have to manually change each b to strong, i to em and so on. In addition, I made some regexes to replace invalid characters with the UTF-8 counterpart. For example, the left quote would be replaced with “. So far, I have character replacement regexes for the following characters:

  • ampersand (&)
  • left quote ()
  • right quote ()
  • en dash ()
  • apostrophe ()

These simple changes will make your typography more presentable while making your HTML more accessible. If you are still manually replacing code or even just using the simple find/replace feature in Dreamweaver, I am highly suggesting that you stop wasting your time. I have added these regexes to the original zip file. I am assuming that this collection will grow in the upcoming weeks.

Download Dreamweaver Regular Expressions Pack