public void NotMatched() { string pattern = @"http://bla.de?hiho.x={(\d+)}"; string value = PatternMatching.MatchEmbeddedRegex(pattern, "http://bla.de?hiho.x=bfd"); Assert.AreEqual(null, value); }
public void MatchWithEscape() { string pattern = @"http://bla.de?hiho.x={(\d+)}"; string value = PatternMatching.MatchEmbeddedRegex(pattern, "http://bla.de?hiho.x=438"); Assert.AreEqual("438", value); }
public void NoEmbeddedRegEx() { string pattern = @"http://bla.de?hiho.x="; string value = PatternMatching.MatchEmbeddedRegex(pattern, "http://bla.de?hiho.x="); Assert.AreEqual(null, value); }
public void MatchSimpleString() { string pattern = @"hiho{(\d+)}bla"; string value = PatternMatching.MatchEmbeddedRegex(pattern, "hiho1234bla"); Assert.AreEqual("1234", value); }