Regular expression help needed
> Basically I'm looking for something which allows time inputs following
> these rules:
> Minutes - either a single 0 or a positive digit but without leading zeroes
> Seconds - between 00 and 59, of course - must always be two digits
> Fractional - two OR three digits
This should do the trick (untested!)
> Does anyone have a good regexp which could do this - reformatting
> erroneous input if possible?
I wouldn't recommend reformatting erronous input, this will only be a source
of problems because it's both very hard to do, and there is a pretty good
change that the reformatting doesn't yield what the user intended.