E:\web\learnaspcom\htdocs\freebook\learn\ubtoc.xml LearnAsp.com - ASP ASP.net Free Lessons
Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll
<Asp.net blog>
<personal site>
xxx

Regular Expressions additional examples
  by Jeff Schoolcraft

Regular Expressions allow complex string examination and manipulation.

Below are some samples that hint at their power.

Here is a very simple regexp validator - zipcode:
   sourcecode_regexpzip.aspx

Making it a little more complicated, allowing for an optional Zip+4
   sourcecode_regexpzip4.aspx

Another simple validator SSN:
    sourcecode-regexpssn.aspx

Here is a phone number
   sourcecode_regexpphone.aspx

Slightly more interesting and useful, replace double words (the the):
   sourcecode_regexpdouble.aspx

Maybe more interesting and less useful, implementing a BBCode style CMS:
   sourcecode_regexpreplace.aspx

The rubber meets the road, MB example and this, syntax highlighting:
   sourcecode_colorize.aspx

Amazon:B0000632ZU The Dan Appleman book is inexpensive and concise.
Amazon:0596002890 this book has decent .net chapter and goe-s much deeper into the philosopy of regular expressions and details all the languages they can be called from.

Online Resources include:

Chaz Wish List
Tall Tip $5
Grande Tip $20
Venti Tip $39
Tip Jar Thanks
2004 Thanks
2005 Thanks
HUGE Tip -love site