I would like to replace the last dot in the following string with a dollar sign, how can I do that?
de.java_chess.javaChess.game.GameImpl.GameStatus
I would like to have de.java_chess.javaChess.game.GameImpl$GameStatus instead.
I am using the following line of code to do so:
invokedMeth = invokedMeth.replaceAll("(.*)\\.(\\d+)$","$1$$2");
However, this doesn't work and I end up with the same original string that I had as an input. How can I fix this?