C# 正则匹配domain
1.带协议表达式
var pattern = @"[(?<=http://)|(?<=https://)]+[\w\.]+[^/?#]";
2.不带协议表达式
var pattern = @"((?<=http://)|(?<=https://))[\w\.]+[^/?#]";
1.带协议表达式
var pattern = @"[(?<=http://)|(?<=https://)]+[\w\.]+[^/?#]";
2.不带协议表达式
var pattern = @"((?<=http://)|(?<=https://))[\w\.]+[^/?#]";