Tuesday, April 7, 2009

Regular Expressions that come in handy

These regexes i seem to need often when polishing static html pages and moving to a css based design. I remove all font related markup like this:

Finds all opening and closing html font tags:

<(/)?font[^>]*>

This on is for all "font-family: XXX;" inline css markup:

font-family:[^;"]*(;|")

No comments: