Sample Header Ad - 728x90

In a string, replace third number in each set with new number

1 vote
1 answer
91 views
I have a string that has coordinates. - Individual coordinates are separated by spaces. - Vertices (X Y Z coordinates) are separated by commas. - Vertex groups are wrapped in brackets and separated by commas. > Before: > MULTILINESTRING M (( 0.0 5.0 123, 10.0 10.0 456, 30.0 0.0 789),( 50.0 10.0 -123, 60.0 10.0 -100000.0)) I want to replace the third coordinate in each vertex with a new number: > After: > MULTILINESTRING M (( 0.0 5.0 1, 10.0 10.0 1, 30.0 0.0 1),( 50.0 10.0 1, 60.0 10.0 1)) For simplicity, we can use the number 1 as the replacement number. --------------------- What's a good way to replace those numbers in that string?
Asked by User1974 (1527 rep)
Apr 1, 2022, 02:12 PM
Last activity: May 6, 2022, 09:11 PM