I have the following cases where I'd like to remove the leading zeros
0 -> 0
0.1 -> 0.1
-0.1 -> -0.1
00.01 -> 0.01
001 -> 1
So whenever there are multiple zeros before the decimal or number, then we remove them. If the zero is by itself, we keep it. I have the following regex:
r'^[0]*'
but this removes all leading zeros. How can I fix this so that it does what I want it to do?