美文网首页
正则表达式相关笔记

正则表达式相关笔记

作者: Joey_Java | 来源:发表于2020-01-31 11:13 被阅读0次

    通过正则表达式查找出所有匹配字符串

            Pattern pattern= Pattern.compile("abc[^0-9]");
            String str="abcdawefawefabcwew";
            Matcher matcher= pattern.matcher(str);
            while (matcher.find()){
                System.out.println(matcher.group());
            }

    相关文章

      网友评论

          本文标题:正则表达式相关笔记

          本文链接:https://www.haomeiwen.com/subject/vuhgthtx.html