Due to limitations i need to write ONE regex and i would like to blacklist instead of whitelist certain strings (or sites)
Here i want to disallow youtube and IP address. Below is code that matches the two site. How can i NOT match them and allow the two google (or any other site) to match?
Here is some C# code i used to test my regex.
var mq = Regex.Match("http://google.com\nhttp://youtube.com\nhttp://google.com/ddhf\n72.72.72.72\n",
@"(.*youtube\.com.*|\d+\.\d+\.\d+\.\d+)", RegexOptions.Multiline);
while (mq.Success)
{
string sz = mq.Groups[0].Value;
Console.WriteLine(sz);
mq = mq.NextMatch();
}
return;