in reply to Re: Help with Numbers..Please
in thread Help with Numbers..Please

Uhm, if you already know it's flawed, by bother posting? How useful is incorrect code?

Anyway, here's a regexp solution that is much simpler, and doesn't fail on "9":

s/(\d+)/$1+1/e;

Abigail

Replies are listed 'Best First'.
Re: Re: Help with Numbers..Please
by perlguy (Deacon) on Apr 24, 2003 at 15:12 UTC
    It won't fail on '9', but your proposed alternative regular expression won't work on '009' for example, as '10' would be the output instead of the requested '010'. Just an observation.