I have to match a text.
Ej:
text = 'C:x=-10.25:y=340.1:z=1;'
Where the values after x,y or z accept values matched by:
-?\d{1,3}(\.\d{1,2})?
How can i reuse that?
Those are the only values that are variables. All others characters must be fixed. I mean, they must be in that exact order.
There is a shorter way to express this?
r'^C:x=-?\d{1,3}(.\d{1,2})?:y=-?\d{1,3}(.\d{1,2})?:z=-?\d{1,3}(.\d{1,2})?;$'