"Tatiana Lloret Iglesias" schreef:

> What regular expression do I need to convert  Version: 1.2.3   to
> Version:
> 1.2.4  ?
>
> I.e.  my pattern is Version: number.number.number and from that i need
> Version: number.number.number+1
> After the : i can have a space or not...

Why use a regex?

perl -wle '
    $v = 2.1.1;
    printf "%vd\n", $v;
    substr $v, -1, 1, chr ord(substr $v, -1, 1) + 1;
    printf "%vd\n", $v
'

See also version.pm

-- 
Affijn, Ruud

"Gewoon is een tijger."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to