> > > François-Xavier > > > > > > My bad, it should be: > > sed 's/0*\([0-9][0-9]*\)/\1/g' > > (tests are indeed needed!) >
Many thanks François. This is almost right, but it is also stripping zeros that follow a letter, and I only want it to strip zeros that are proceeded by a period. There are no leading zeros in the first octet of the IP so that case does not need to be handled. Does the \1 refer to what's in the ()'s? So anything that one would wont to carry through should be inside the ()'s and anything that's outside is stripped, right?