This is supposed to take temperature measurements as a range, and leave only the lower part of it i.e. 25.3-26.5 -> 25.3. The first -? is for negative temperatures, as is the \- in the middle as in: -23--10.2. Decimal points are optional, as is the precision of the decimal.
It works for most of my numbers, but goes nuts with something like 52-52.5 -> 525. It should just leave 52, but tacks the trailing 5 on. Can anyone help explain this, or suggest an alternative superior regexp?
In reply to Misunderstood regexp by moonunit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |