zl程序教程

您现在的位置是:首页 >  前端

当前栏目

正则表达式 常用

2023-09-11 14:22:27 时间

 

 字符串只保留数字和小数点(原地址:https://zhidao.baidu.com/question/2076718713109720948.html)

'¥100,000.00'.replace(/[^\d.]/g,'')

 

 

MatchCollection mc = Regex.Matches(Content, "dt.Rows[\\s\\S]*?.ToString()");

 

 

MatchCollection mc = Regex.Matches("   map_Ka daolutietu你哈.png", "\\s([0-9a-zA-Z_\u4E00-\u9FA5]*?.(jpg|gif|png|bmp))");

 

 

MatchCollection mc = Regex.Matches("    map_Ka /Upload/附件/桥梁/23/模型/daolutietu.png", "\\s([\\/_0-9a-zA-Z\u4E00-\u9FA5]*?.(jpg|gif|png|bmp))");
//匹配规则 / _ 数字 小写字母 大写字母 中文 最小匹配 . jpg|gif|png|bmp其中的一种图片