splitting text with several condition in java

Solutions on MaxInterview for splitting text with several condition in java by the best coders in the world

showing results for - "splitting text with several condition in java"
Edoardo
27 Nov 2017
1    Pattern pattern = Pattern.compile("(\\w+)([<=>]+)(\\w+)");
2    Matcher matcher = pattern.matcher("var1>=ar2b");
3
4    if(matcher.find()){
5        System.out.println(matcher.group(1));
6        System.out.println(matcher.group(2));
7        System.out.println(matcher.group(3));
8    }