关于字符串math函数的用法例子
2016-12-09 11:46
260 查看
var objStr=new String("Yue I love you till the end of my life!"); var reg3 = /[^\s+]/g; objStr.match(reg3) //结果: ["Y", "u", "e", "I", "l", "o", "v", "e", "y", "o", "u", "t", "i", "l", "l", "t", "h", "e", "e", "n", "d", "o", "f", "m", "y", "l", "i", "f", "e", "!"] var reg = "hellow word"; reg.match(/\w+\o\w+/g) //结果 ["hellow", "word"] //可以理解为match() 方法可在字符串内检索指定的值,或找到一个或多个正则表达式的匹配。
相关文章推荐
- 关于DDE,简单用法,例子
- 关于oracle包utl_file用法的小例子
- Android关于ExpandableListView用法的一个简单小例子。仿QQ列表
- 关于ASP.NET中TreeView用法的一个小例子
- 关于ASP.NET中TreeView用法的一个小例子
- MSDN上关于读取连接字符串的例子。
- 一个关于字符串截取输出的例子
- 关于jquery easyui 中treegrid的用法例子
- php手册中关于func_get_args()的用法例子
- Android中关于ExpandableListView用法的一个简单小例子
- 刚才看到一个关于字符串反转的例子
- 关于ExpandableListView用法的一个简单小例子
- 关于ExpandableListView用法的一个简单小例子
- 关于ExpandableListView用法的一个简单小例子
- DecimalFormat的几种用法!关于字符串的使用
- 新手上路_vc多线程例子,关于AfxBeginThread的用法
- 关于字符串的连接与截取例子。,。。
- 关于JavaScript中cookie的用法例子
- 关于ExpandableListView用法的一个简单小例子
- 关于DELPHI数组,指针,字符串转换的例子!(转)