So I am trying to get string.match to not only get '%d+'(any string of strait digits) but I want it to include decimal points IF they are present. I can't make the pattern '.%d+' or '%d+.%d+' because then those would detect any punctuation and wouldn't get a plain non decimal number
I'm so lost here
Try the pattern "(%d*%.?%d+)"
It matches:
But not:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With