似乎是这样,可能有待改进
str="tom<0213321547>,t<03321547>"
part=/(([a-z]|[A-Z])+(<)[0-9]+(>)((,)|$))+$/
if(part.exec(str)==null) alert("不匹配")

解决方案 »

  1.   

    <script language="vbs">
    Function est(Str)
        dim rep
    set rep = New RegExp
    rep.Global = True
    rep.IgnoreCase = True
        rep.Pattern="(([a-z]){1,}<([0-9]){1,}(>\,){1,}){1,}$"
    'rep.Pattern="(([a-z]){1,}<([0-9]){1,}((>\,)|(>))){1,}"
    '如果是非字符数字和汉字
        est=rep.Test(Str)
        set rep=nothing
        end function
    </script>
    <input name=abc>
    <input type=button onclick=alert(est(abc.value)) value='测'>