This function is re-written by the feedback of @jmcanterafonseca in case of formatting characters included, like '5874' to '0225-8744829' , '5426' to '05.19.93.54.26'. It's doing somewhat low-level string comparison.