Originally posted by TLord
Why all of this ?

VB.Net offers a compilation option: Option Compare, this option controls the behavior of the program when comparing string values, there are 2 options: Option Compare Binary which forces the strings to be in the same case for true equationing, Option Compare Text which compares the text by their characters ignorign the case - and that is the optino you want.

To use option include the statement in the top of the file preceeding any declaration (before the "Imports" statement also).

Examples:
VB Code:
  1. Option Compare Binary
  2. ...
  3. Dim Rs As Boolean
  4. If "AaBbCc" = "aabbcc" Then
  5. Rs = True 'Rs is still False
  6. End If

VB Code:
  1. Option Compare Text
  2. ...
  3. Dim Rs As Boolean
  4. If "AaBbCc" = "aabbcc" Then
  5. Rs = True 'Rs is True now
  6. End If
Option Compare has to do with how your source code compatibility is maintained, not how strings are compared.

If what you are saying were true, then why would Microsoft invest the effort they have into REGEX.

This kind of advice should be thoroughly researched before being offered.