I use the Pattern and Matcher in JAVA for comparing strings to regular expressions. In case of error in the input string (not match) I just want to get the index of the last character which matches expression to find the problematic character in the string.
I do not know if the question has been asked, but I do not know how to get this value: in fact these are the attributes 'last' and 'oldlast' Object match, but they are inaccessible directly.
And when the end () method is called when the result does not match throughout the first attribute is -1 is an IllegalStateException is thrown
Does anyone have an idea of the way to do to get this value?
Bookmarks