First extract the data you need - there are two basic ways to do that:
1) Use string.FindFirst to get the position of the "Y" and then use Substring to extract the data after it.
This is a bit dangerous, because if that prefix "G01" could ever contain a "Y" your code will break.
2) Use a Regex:
(?!.+?\sX[+-]?\d+\.\d+\sY)([+-]?\d+\.\d+)$
That will extract the number at the end only.
Either way, then use double.TryParse to convert that to a numeric value.
Process the value as needed, and use Regex.Replace with the same regex and the new value as a string to replace it.