I have an input string, let's say it's 111.112.111.0.0 > 111.33.44.55.11 pxs ikf len 3348 , it might also sometimes be input via the stream as 111.112.111.0.0 > 111.33.44.55.11 pxs ikf len 3348 BBBTTT.
How do I capture the numbers occuring after "len" in the via substring? Using system.out.println(stringStr.substring(stringStr.lastIndexOf(" ") + 1) will only print 3348 if it's the last part of the string above, but if BBBTTT appears, it will not work.
How do I print the numbers of a substring specifically after "len" but not including anything but the numbers that follow(might be 0-9999, not more), so not any characters following?