Comparing Strings

  • Thread starter Thread starter Brij Singh
  • Start date Start date
B

Brij Singh

Hi,

Is there a way to compare two strings with search character

like A = "Apple"
B = "app"

and if user input is "A*" or "a*" or "Ap*" then it will compare equal to
Both A and B above.


Thanks in advace.

Brij
 
Brij,
and if user input is "A*" or "a*" or "Ap*" then it will compare equal to
Both A and B above.
"A*" or "a*" or "Ap*" are all examples of regular expressions, have a look
at the System.Text.RegularExpressions namespace. Specifically the RegEx
class.

There are options to make the RegEx case insensitive such that A = a.

Hope this helps
Jay
 
* "Brij Singh said:
Is there a way to compare two strings with search character

like A = "Apple"
B = "app"

and if user input is "A*" or "a*" or "Ap*" then it will compare equal to
Both A and B above.

Have a look at the documentation for the 'RegEx' class and/or the 'Like'
operator.
 
Back
Top