.Net Regular Expression for Common Fields

Regular Expressions are very handy but sometimes can be daunting depending on what you need to validate. I recently needed a regular expression and decided this would be a good ongoing blog to write. I have a few I will add here as time permits.

This one is good for amounts (whole dollar amount, dollar with decimal, dollar amount with both cents digits):

Zip Code:

US Phone Number (ddd)ddd-dddd:

A great tool (and a source for more regular expressions) can be found at:

Posted on May 28, 2009, in .Net, programming, technology and tagged , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: