Answers for "regex in c#"

C#
8

regex in c#

string regex = @"\me\";
steing testRegex = "Hit me with that titan Boa baby.";

Regex re = new Regex(regex);


if (re.IsMatch(testRegex)){
 // WIll return true if it matches. # It does
  return true;
} else {
 // Will return false if it does not macth 
  return false;
  
}
Posted by: Guest on April-09-2020

C# Answers by Framework

Browse Popular Code Answers by Language