Str Like IN C#

  • Thread starter Thread starter do cang via .NET 247
  • Start date Start date
D

do cang via .NET 247

(Type your message here)

--------------------------------
From: do cang

public static bool StrLike(string values,string patern)

{

patern=patern.Replace("*",@"(\w){0,}");

patern=patern.Replace("?",@"(\w){1}");

patern="^" + patern + @"\z";

return System.Text.RegularExpressions.Regex.Match(values,patern).Success;

}
 
Hello,
Please explain your problem in details. Your post is ambiguous.

Regards,
Rami Saad
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top