Is there a way to find out how many numbers are at the end of a string without knowing the exact index?
问题 I have a method that extracts a certain substring from a string. This substring consists of the numbers in the string. Then this is parsed to an integer. Method: protected int startIndex() throws Exception { String str = getWorkBook().getDefinedName("XYZ"); String sStr = str.substring(10,13); return Integer.parseInt(sStr) - 1; } Example: String : '0 DB'!$B$460 subString : 460 Well, I manually entered the index range for the substring. But I would like to automate it. My approach: String str =