Sunday, February 25, 2007

Internet Anagram Server

Found a good site today which rearranges the characters in a word that you input.
Actually it was there in my mind to make a windows application which does this, so before starting to work on it thought it would be better to search on the net whether some one had made this before and ended up on this site.
http://wordsmith.org/anagram/

Wednesday, January 24, 2007

Using a Regular Expression in the Code Behind page

I searched google for something like this but didn't find any...
So am posting the one which I made here..

Function IsValidEmail(ByVal strEmail As String) As Boolean
Dim RegExp As New Regex("\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*")
Return RegExp.IsMatch(strEmail)
End Function

Now on the respective event call the function like this..

Dim boolValid As Boolean
boolValid = IsValidEmail("rajesh@nurture3.com")
Response.Write(boolValid)

Cheers
Rajesh Sivaraman.