So, Lets say I have a
String s = "{(30,2884090,1410450570357,235),(30,2863348,1410451100148,285)}";
Matcher match = Pattern.compile("(\\d+,)*\\d+").matcher(s);
So the issue is sometimes, the String s is so big that I get heap error:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:2694)
at java.lang.String.<init>(String.java:203)
- How do i handle this as an exception, so that my code still keeps on
- going Any better way to handle such large strings?