I've the following string (meaning it's not numeric):
"0870490055012000000000"
wich is always 22 characters long. I need to transform into:
"087.049.0055.0120.0000.0000"
Using PHP or even on js/client side.
I found something like this but was not able to solve the problem.
I guess there are many ways to solve this. I'm just asking for something like:
$x= format("00000", "xxx.xxx..xxx.x.x.x")
or
$x = preg_replace("/a;;w.;w;e;ew")