I have an extremely long string that I want to parse for a numeric value that occurs after the substring \"ISBN\". However, this grouping of 13 digits can be arranged differ
Do it in one step with a pattern recognizing everything, and optional dashes between digits. No need to fiddle with ISBN offset + substrings.
ISBN(\d(-?\d){12})
If you want the raw number, strip dashes from the first matched subgroup afterwards. I am not a Java guy so I won't show you code.