Hey there, it looks like this is your first time here. May I suggest subscribing to this blog and checking out these articles.

SOME RANDOM DUDE

More Dreamweaver Regular Expressions

5.07.06 @ 9:21 pm

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 Download Dreamweaver Regular Expressions Pack, , , , , , , , ,

Liked This Post?

Well then, post the article to del.icio.us and subscribe to Some Random Dude's RSS Feed.

Show some comment love.

Total Donations for November:

$11.00

Want to help a good cause? Want to get this number higher? Learn how.

7 Responses to “More Dreamweaver Regular Expressions”

  1. […] 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 […]


  2. Gravatar
    $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 ;)


  3. Gravatar
    $0.00 in Comment Love for November

    You’re a regular expressions treasure, P.J.

    I have university courses flashbacks! :P


  4. 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.


  5. Gravatar
    $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


  6. The search statement would be:
    (#Val\(ARGUMENTS\.[^\)]*\)#)

    The replace statement would be:
    <cfqueryparam value="$1" cfsqltype="cf_sql_numeric">

    Good luck. :)


  7. Gravatar
    $0.00 in Comment Love for November

    Sank u ;)


Leave a Reply

Additional Doodads

Subscribe to Some Random Dude

Related Entries:

Most Commented Pages