wildcard searches

  • Thread starter Thread starter fred
  • Start date Start date
F

fred

Hi,

is there a way to compare a string to a string using wildcards. In other
words is there an equivalent in C# to the VB statement:
if myString like "[a-z]*[agj]#" then

thanks,
Fred
 
Hi there Fred,

Take a look at System.Text.RegularExpressions.Regex.IsMatch(string,string)

HTH,

Andrés Taylor
 
fred said:
is there a way to compare a string to a string using wildcards. In other
words is there an equivalent in C# to the VB statement:
if myString like "[a-z]*[agj]#" then

You may want to use regular expressions. See
System.Text.RegularExpressions.Regex for more information.

Best regards,

Michael
 
Back
Top