📜  在java代码示例中使用多个条件分割文本

📅  最后修改于: 2022-03-11 14:52:44.848000             🧑  作者: Mango

代码示例2
Pattern pattern = Pattern.compile("(\\w+)([<=>]+)(\\w+)");
    Matcher matcher = pattern.matcher("var1>=ar2b");

    if(matcher.find()){
        System.out.println(matcher.group(1));
        System.out.println(matcher.group(2));
        System.out.println(matcher.group(3));
    }