String pattern = "(.*)(\\d+)";
while(m.find()){
System.out.println(m.group(1));
System.out.println(m.group(2));
}
Input:
This order was placed for QT3000! OK?
Output :
This order was placed for QT300
0
Why in the first line of output it doesnot include the third 0 i.e QT3000? Why is the second line of output it doesnot print 3000?