I want to find exact url mach in url list using with Regular Expression .
string url = @"http://web/P02/Draw/V/Service.svc";
string myword = @"http://web/P02/Draw/V/Service.svc http://web/P02/Draw/V/Service.svc?wsdl";
string pattern = @"(^|\s)" + url + @"(\s|$)";
Match match = Regex.Match(pattern, myword);
if (match.Success)
{
myword = Regex.Replace(myword, pattern, "pattern");
}
But the pattern returns no result.
What do you think is the problem ?
You’re passing wrong arguments to
Regex.Matchmethod. You need to swap arguments like this>