Phone Number Validation 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(("^\(?\d{3}\)?\s|-\d{3}-\d{4}$")) If regexp.IsMatch(strPhone) Then MsgBox("Valid Phone Number") Else MsgBox("Invalid Phone Number") End If End Sub 11:03:03 PM |
comment [] trackback [] |
Zip Code Validation 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 Zip code 'Dim strZip As String = "AB123" ' valid Zip Code Dim strZip As String = "03110" Dim regexp As New Regex(("^\d{5}$")) If regexp.IsMatch(strZip) Then MsgBox("Zip Code") Else MsgBox("No zip match") End If End Sub 10:53:15 PM |
comment [] trackback [] |
Sharepoint Customization Toolkit While doing some reading I ran across this new resource that has been posted. http://www.sharepointcustomization.com/default.aspx Frontpage has come a long way is the perfect visual designer for both SPS and WSS. 9:48:18 PM |
comment [] trackback [] |
Smartphone Fun for the Developer A couple of weeks ago I was given a SmartPhone as part of the Smartphone Developer Kit. What an incredibly cool gadget for developers. Well I am just getting a chance to really smart playing with it and will post more info as I get further along. Due to my incredibly advanced and keen sense of development style after about 20 minutes I ended up needing to reset the phone. Ok - maybe not such a great development style. I ran across the following site that talks about resetting the phone and basically breaks down into the following steps: 1. Hold the record button and quickly press power button 2. When the device asks if you want to clear flash, select Yes 3. Wait for the green progress bar to go across screen. The device should boot normally 12:49:06 PM |
comment [] trackback [] |