From: Robert Klemme Date: 2007-12-30T02:35:03+09:00 Subject: Re: trimming leading zeros On 29.12.2007 13:00, Dipesh Batheja wrote: > Is there any function in ruby which allows you to trim leading zeros (or > any specific character) from a string. Or if there is some reg > expression that i can use? The simplest and fastest is probably s.sub! /\A0+/, '' Kind regards robert