> > $ printf '0.1.2.3 01.2.3.4 1.2.3.0 1.2.000.3\n' | \ > sed 's/0*\([[:digit:]]\+\)/\1/g' > 0.1.2.3 1.2.3.4 1.2.3.0 1.2.0.3 > > > Hi David - thanks for that.
So [[:digit:]] is another way of writing [0-9] and the + just means another instance of the proceeding expression, right, so your and Francois solutions are functionally the same, and all the following are the same too, right? [[:digit:]]+ [[:digit:]][[:digit:]] [0-9]+ [0-9][0-9]