I'm writing a binary/decimal/hexadecimal converter for Android and am trying to format a String in Java with a regex that will add a space to every four characters from right to left.
This code works from left to right, but I am wondering if there is a way I can reverse it.
stringNum = stringNum.replaceAll("....", "$0 ");