随笔 - 65  文章 - 0  评论 - 23  阅读 - 16万
08 2012 档案
关于JS和C#的正则替换两个小例子
摘要:应用实例:待处理字符串:str=”display=test name=mu display=temp”要求:把display=后的值都改成localhostJS处理方法: str.replace(/display=\w*/g,”display=localhost”);C#处理方法:Regex reg=new Regex(@”display=\w*”); str=reg.Replace(str,”display=localhost”);应用实例:待处理字符串:str=”display=test name=mu display=temp”要求:字符串变为display=localhosttes.. 阅读全文
posted @ 2012-08-24 00:32 穆穆 阅读(652) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示