I tried to write a RegEx
Log.e("before: ", number);
number = number.replaceAll("^[0]{0,4}", "+"); // e.g. 004912345678 -> +4912345678
Log.e("after: ", number);
that makes from
004912345678
+4912345678
and in fact it works, BUT it also makes from
+4912345678
++4912345678
and that I don't want. I don't know why it matches strings, that begin with +, since
I wrote ^[0]... in my pattern.