Check out example codes for "splitting text with several condition in java". It will help you in understanding the concepts better.

Code Example 1

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));
    }

Learn ReactJs, React Native from akashmittal.com