好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

一个不错的正则

哦,这样也可以匹配空格啊,以后又可以方便了啊
re = /(\w+)\s(\w+)/; str = "John Smith"; newstr = str.replace(re, "$2, $1"); document.write(newstr)
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

查看更多关于一个不错的正则的详细内容...

  阅读:72次