On May 2, 2018 at 16:24, mborner said...
Thanks. At the risk of sounding needy, I've been spending hours studying and learning regular expressions but I'm guessing regex can't to that, am I right?
The parsed data from the receiver looks like this: 98MV495MVMAX 98MV49MVMAX
Notice no decimal points or zeroes in the string.
so that says 49.5 and 49?
So do the regex to get the value. 495
Then you can check the last digit. 5
Is the number > 101? Yes so create a string with the first two digits add a . and the last digit or just a 0.
If the number is < 100 just check the 9 cases where it might not be a half step: 15,25,35,45...
I mean there are some other things you can do I guess for better checks but I am too tired to do math right now.