string str="<a href=\"*\">";

解决方案 »

  1.   

    看看有没有帮助。
    http://community.csdn.net/Expert/topic/3125/3125239.xml?temp=.6891138
      

  2.   

    说话得算术哦~
    **********************************/
    /*****  是否为单个数字符(0~9) *****/
    /**********************************/
    function isNumber(str){
        if ( (/^\d$/g).test(str) == true )  
            return true;
        return false;
    }/**********************************/
    /*****      是否为整型        *****/
    /**********************************/
    function isInteger(str){
    if (/^\d+$/.test(str) == true) {
    return true;
    }
    return false;
    }
    /**********************************/
    /*****      是否为有效的密码  *****/
    /**********************************/
    function isValidPassword(str){
    if (!(/^[\x00-\xff]+$/.test(str))) {
    alert("密码含有非法字符!");
    return false;
    }
    if (str.length < 4) {
    alert("请输入四位以上密码!");
    return false;
    }
    if (str.indexOf(" ") >= 0) {
    alert("密码不能含有空格!");
    return false;
    }
      

  3.   

    Pattern p = Pattern.compile("\\w+\\.\\w+\\.\\w+");
    Matcher m = p.matcher("<A  target=_blank href=www.google.com >搜索</a>");
    while (m.find()) {
        System.out.println(m.group());
    }
      

  4.   

    Pattern a = Pattern.compile("href=[^ ]+");
    Pattern b = Pattern.compile("[^=\"]+([\\.][^ \"]+)+?");
    Matcher m = a.matcher("<A  target=_blank href=\"www.google.com" >&Euml;&Ntilde;&Euml;÷</a>");
    Matcher n;
    while (m.find()) {
    n=b.matcher(m.group());
    while(n.find())
             System.out.println(n.group());
    }
    }