2007/4/27, Tatiana Lloret Iglesias <[EMAIL PROTECTED]>:
Hi all!

how can I create a regular expression to find a software version pattern in
a file (e.g.  1.2.0) and return the last number , i.e. 0

Hi,

What's the form of your version string?
Given the case of $version_str = '1.2.0',you may write:

my ($lastnum) = $verison_str =~ /.*\.(\d+)/;

Good luck.

--
Chinese Practical Mod_perl book online
http://home.arcor.de/jeffpang/mod_perl/

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


Reply via email to