Thom Robbins .NET Weblog

A blog of the technical and only sometimes uneventful side of programming in .NET and life within Microsoft

Browse by Tags

Tagged Content List
  • Blog Post: Pattern Matching

    At some point everyone has written code to test values that match patterns. There are many different ways this can be done. Typical examples, include string handling or using the myriad of other algorithms available. Recently, I have been working the Regular Expressions available within .NET. I am pretty...
  • Blog Post: Validating Zip Code

    I was recently putting together some proof of concept for a customer and realized that I hadn't posted one of the common Regular Expressions that I had been using. Validating a Zip Code: Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Invalid...
  • Blog Post: Finding a Value

    Character matching is one of the most powerful features of regular expressions. They allow the developer to quickly find certain patterns and characters within strings. The “.” is one of the most important and easiest to use examples of this. The period is a special character with regular expressions...
  • Blog Post: Validating a Phone Number

    Simple example of validating a phone number: Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Invalid phone number 'Dim strPhone As String = "123456789" ' valid phone number Dim strPhone As String = "(123) 456-7890" Dim regexp As New Regex...
  • Blog Post: Validating Email

    While doing some coding the other day I needed an expression to validate email addresses. The trick was that it had to be flexible enough to handle emails in the format of username@company.com and firstname.lastname@company.com . Imports System.Text.RegularExpressions Private Sub Button1_Click(ByVal...
  • Blog Post: What is a Regular Expression

    Regular expressions are about finding and changing patterns. One of the most common that I always find is the need to reformat a “proper name”. It seems that every conversion program that I get involved in requires the re-ordering of the name. Regular expressions offer something called a backreference...
  • Blog Post: Welcome Back

    Welcome to the new site! I am working on moving the older content back. Stay Tuned
Page 1 of 1 (7 items)