今天在一本书《Javascript for impatient programmers》上看到写的是这样用 match(regExp: string | RegExp): RegExpMatchArray | null 上面用的是类Typescript的写法来说明,个人觉得挺好的 意思是match方法接受传递一个参数 regExp ,这个 regExp 可以字符串或者正则表达式。返回
假设有如下字符串: strSource="<a href='http://www.callcenter.com/viewNewsDetail.asp?ID=10873&classID=3' title='广发银行信用卡中心外呼团'><span class='text-main'>[09/