str.replace(/display=\w*/g,"display=localhost");
Regex reg=new Regex(@"display=\w*"); str=reg.Replace(str,"display=localhost");
var reg = /(display=)(\w*)/g;
var result;
while ((result= reg.exec(str))!=null) {
str= str.replace(result[0], result[1] + "localhost" + result[2]);
}
/// <summary>
/// 定义处理方法
/// </summary>
/// <param name="match">符合的字符串</param>
/// <returns></returns>
private string Evaluator(Match match)
{
//(display=)(\w*) Groups按查找到的字符串再根据分组进行分组
//第0组为整个符合的字符串,后面的组按括号顺序排
string str =match.Groups[1].Value+"localhost"+ match.Groups[2].Value;
return str;
}
Regex regex = new Regex(@"(display=)(\w*)");
string result = regex.Replace(str, Evaluator);
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有