So yes, you can.
# M1005 skew factor RegexParser( r".*M1005:(new|current)\s*XY_comp_ang\s*=\s*(-?\d+\.?\d*)", lambda match: { "command": "M1005", "param": { "skew": match.group(1), "XY_comp_ang": float(match.group(2)), }, }, ),
So yes, you can.
# M1005 skew factor RegexParser( r".*M1005:(new|current)\s*XY_comp_ang\s*=\s*(-?\d+\.?\d*)", lambda match: { "command": "M1005", "param": { "skew": match.group(1), "XY_comp_ang": float(match.group(2)), }, }, ),