On Mon, 24 Feb 2003, Colin Johnstone wrote:

> Gidday all,
>
> >From this string I wish to return everything to the left of the last
> occurence of "." if it exists.
>
> string = "3.25.23.4";

my $string = "3.25.23.4";
my $ret = '';
$ret = $1 if ($string =~ /^(.*)\./);
print "$ret";

This will print
3.25.23

>
> Any help appreciated
>
> Thank You
> Colin
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to