I need to Split my string into some specified length(10 char).
Below is my code:
Pattern p = Pattern.compile(".{0,10}");
Matcher m = p.matcher("012345678901234567890123456");
List<String> emailStr = new ArrayList<String>();
while(m.find())
{
System.out.println(m.group());
}
As for my requirment I will get max of 3 Strings. I want to assign this "n" number of strings to separate variable. I donot have any idea on this. Please help on it.