Write a regular expression with repeated rules

I want to write a regular expression with repeated rules.

String resList = "WW200020+ww200020";
if(resList!=null && (resList.matches("^([a-zA-Z]{2}[0-9%_]*)"))){ 
    resList =resList.substring(2);  
}

+ is the delimiter which can be optional for example it can also be like WW200020. Need to repeat the rule after the + symbol. How do we write regular expression to have repeated rules.

Please help me


Source: regex

Leave a Reply