in reply to Regular Expression from Hell

What's the target of that operation? Just add leading 0's with 5 digits?

pelagic

Replies are listed 'Best First'.
Re: Re: Regular Expression from Hell
by Anonymous Monk on Apr 15, 2004 at 15:34 UTC
    Is to say if a ZIP number is coming in with 4 digits only add a "0" at the begging. Else if it already has 5 digits leave it alone.
      printf '%05d', $test;

      pelagic