pf » Tag: regex on Pete Freitag's Blog
May 29, 2007
CFPARAM for Simple String Validation
With the addition of a dozen new type values for the cfparam tag in ColdFusion 7, it has become a handy tool for validation.I have a little trick for those of you who are using earlier versions of ColdFusion that don't support the new types for validation.
September 05, 2006
Widon't and Widows
Shaun Innman posted about a technique he call's Widon't, for dealing with the widow problem on the web.The widow problem is when you have a single word on a line by itself, at the end of a headline or paragraph. In typesetting this word is called a widow.
December 22, 2005
Let the computer do the formatting
Brian Crescimanno recently published a form usability checklist on A List Apart. It's a great article that hits home some of my form pet peeves.
November 30, 2005
Howto make Friendly URLs
Thinking and Making has a good article called: Friendly URLs improve usability and user experience. I've always been a big fan of the friendly urls, when I see a site that uses friendly URL's I get a sense of elegance, and cleanliness.
September 01, 2005
Cheat Sheet Roundup - Over 30 Cheatsheets for developers
Lets face it, unless you have a photographic memory, no developer can remember all the different functions, options, tags, etc. that exist. Documentation can be cumbersome at times, thats why I like cheat sheets.
June 24, 2005
Auto-Linking Comments
To avoid comment spam, my blog comments are displayed as plain text. However urls to other entries on my blog are often posted to in the comments. So I wrote a simple regular expression to create hyperlinks out of them:REReplaceNoCase(comments.comment,
"(http://www\.
May 19, 2005
Regex to Replace Multiple Blank Lines with One
I'm working on a function to strip HTML, but preserve things like paragraph spacing. In removing HTML tags, sometimes you end up with lots of blank lines...
March 28, 2005
REFind and ReReplace support \r \n and \t
I noticed today that the regular expression functions in CF support the newline character \n Chr(10), carriage return \r Chr(13), and tab \t Chr(9).
March 23, 2005
Function to get Page Title from a URL
I wrote a simple function today that grabs a url, and parses out the title of the page from the url:
March 23, 2005
Regular Expressions
I was telling my girlfriend that I was working with regular expressions yesterday, and she said: Regular Expressions... sounds like a division of Hallmark. She of course is not a programmer, and she cracks me up with these sort of comments all the time.
March 21, 2005
Regular Expressions - Named Capture Groups
I am porting some code from .NET to Java today, and found out about a very cool feature in regular expressions called Named Groups. Most regular expression implementations let you group text (which can then be used for back-references) using parenthesis, for example: my name is (pete).
December 19, 2003
Regular Expressions with ColdFusion - a Howto Guide
Regular Expressions are a powerful tool for both developers and computer users alike. Regular Expressions were originally developed on Unix systems and used in programs like Perl, sed, and grep.
Subscribe to my RSS Feed:
RSS
RSS
Pete Freitag is a software engineer, and web developer located in




