JS字符串匹配手机号码的正则表达式

亲测可用,适应所有情况:

str = str.replace(
    /(1[3|4|5|6|7|8|9]\d{9})(((\D{1}|$)[\s\S]*)+)/g,
    '<a onclick="alert($1)">$1</a>$2'
)