More Dreamweaver Regular Expressions
5.07.06 @ 9:21 pmA 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 Packampersand, apostrophe macromedia, dreamweaver, en dash, html, html characters, left quote, regexes, regular expressions, right quote web development

July 6th, 2006 at 9:07 am
$3.00 in Comment Love for November
[…] I have added some regexes to the collection, specifically in deprecated tag and non-standard character replacement. Technorati Tags: dreamweaver, html, macromedia, regexes, regular expressions, web development […]
July 7th, 2006 at 10:37 am
$0.00 in Comment Love for November
Since your last post on the subject of regular expressions I will admit ive been steadily using them more and more. Thanks for these additional ones too - great resource you’ve given us PJ
July 9th, 2006 at 5:49 am
$0.00 in Comment Love for November
You’re a regular expressions treasure, P.J.
I have university courses flashbacks!
July 9th, 2006 at 9:01 am
Yeah, I “moved on” from my computer science major before it got into regular expressions. I am starting off from scratch, but it’s definitely worth learning.
August 23rd, 2006 at 6:15 am
$0.00 in Comment Love for November
I use Coldfusion and I was wondering if it is possible to create a regular expression to do the following?
Replace………
WHERE CategoryID = #Val(ARGUMENTS.CategoryID)#
or
WHERE AdID = #Val(ARGUMENTS.AdID)#
With………
WHERE CategoryID =
WHERE AdID =
etc
August 23rd, 2006 at 8:46 am
The search statement would be:
(#Val\(ARGUMENTS\.[^\)]*\)#)
The replace statement would be:
<cfqueryparam value="$1" cfsqltype="cf_sql_numeric">
Good luck.
July 26th, 2007 at 12:43 pm
$0.00 in Comment Love for November
Sank u