springbok / MLM2PRO-GSPro-Connector

GSPro Connector for the MLM2PRO Launch Monitor
GNU General Public License v3.0
49 stars 6 forks source link

Strip trailing periods, which sometimes come from the degree symbol #15

Closed wonder99 closed 1 year ago

springbok commented 1 year ago

I missed this cleaning code when I added some cleaning code in the other method, we could use a regular expression instead, for example this should strip any invalid chars:

re.findall(r"[-+]?(?:\d*\.*\d+)", result)[0]
wonder99 commented 1 year ago

Looks good.

On Sun., Jul. 30, 2023, 9:56 p.m. Etienne van Tonder, < @.***> wrote:

I missed this cleaning code when I added some cleaning code in the other method, we could used a regular expression instead, for example this should strip any invalid chars:

re.findall(r"[-+]?(?:\d.\d+)", result)

— Reply to this email directly, view it on GitHub https://github.com/springbok/MLM2PRO-GSPro-Connector/pull/15#issuecomment-1657381280, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIZTO25U4KLVTWB4ZRDRGTXS4GDZANCNFSM6AAAAAA25SH7CI . You are receiving this because you authored the thread.Message ID: @.***>