Dnia 9-05-2007 o godz. 7:19 Luke Vanderfluit napisał(a):
> Hi. I have a csv file that contains a field with a number, say 98.
> I need to zerofill the fields to be 6 digits.
> So any field that is say 98, should become 000098.
> 
> Is there an easy way to do this with search and replace?

Assuming you get your number:

s/98/\=repeat('0', 6-len(submatch(0))).submatch(0)/

m.

----------------------------------------------------
Morderstwa i krew ofiar na ścianach. Mroczne miasto 
pogrążone w chaosie. Sprawdź kto jest Przybywającym!
Przybywający - thriller metafizyczny już w księgarniach.
http://klik.wp.pl/?adr=http%3A%2F%2Fksiazki.wp.pl%2Fkatalog%2Fksiazki%2Fksiazka.html%3Fkw%3D10414&sid=1128


Reply via email to