I have an alpha-numeric string and I want to check for pattern repetition in it just for the integers. And they should be continuous.
Example
I am not sure if you are familiar with RegularExpressions (RegEx) but this code works
String str = "12341234qwe";
String rep = str.replaceAll(".*(.+)\\1.*","$1");
if (rep.equals(str))
System.out.println(str+" has no repition");
else
System.out.println(str+" has repition "+rep);
str = "1234qwe1234";
rep = str.replaceAll(".*(.+)\\1.*","$1");
if (rep.equals(str))
System.out.println(str+" has no repition");
else
System.out.println(str+" has repition "+rep);
Here is tutorial: http://docs.oracle.com/javase/tutorial/essential/regex/