Replacing a number with the first four digits
Posted: Sat Aug 08, 2015 2:50 am
Hello guys.
I have a list of numbers (geocoordinates) and the number of digits varies. I need to search the ones with more than four digits after the point and replace them with the first four digits only.
example: 48.655483275
I need to replace with 48.6554
I'm using [0-9]{5,}, and this found all the numbers with more than four digits after the point, but I'm failing in replace the number with the first four digits.
thanks
I have a list of numbers (geocoordinates) and the number of digits varies. I need to search the ones with more than four digits after the point and replace them with the first four digits only.
example: 48.655483275
I need to replace with 48.6554
I'm using [0-9]{5,}, and this found all the numbers with more than four digits after the point, but I'm failing in replace the number with the first four digits.
thanks