On Thu, 25 May 2006, Tien Pham apparently wrote: 
> I have a very large file containing 7000 lines of data in 
> a single column.  Below is a sample. Many of them are 
> 7 digit numbers and others are 8 digit numbers. For those 
> 7 digit numbers, I need to add number 0 at the beginning 
> of it.

%s/^\d\{7}$/0&

hth,
Alan Isaac


Reply via email to