1.带协议表达式
var pattern = @"[(?<=http://)|(?<=https://)]+[\w\.]+[^/?#]";
2.不带协议表达式
var pattern = @"((?<=http://)|(?<=https://))[\w\.]+[^/?#]";
时间: 2024-10-21 01:44:22
1.带协议表达式
var pattern = @"[(?<=http://)|(?<=https://)]+[\w\.]+[^/?#]";
2.不带协议表达式
var pattern = @"((?<=http://)|(?<=https://))[\w\.]+[^/?#]";