Use the substr function.
On Fri Oct 18, 2002 at 06:00:03PM +0300, Roman @ Melihhov wrote:
> Sup,
>
> I know how to match certain length patterns, but is there any way to return only
>certain amount of the $1
>
> if ($k_7 =~ /^(www\.(\S+|$))/i)
> {$k_7 =~ s/(www\.(\S+|$))/<A href=\"http:\/\/$1\" title=\"$1\"
>target=\"_blank\">$1<\/A>/gi;}
>
>
> I need that $1 (in red) in the visible part of URL would be max 40 characters,
>while hyperlink actual path $1 be full length. Is there any way to make it.
>
> Ideas appreciated,
> Roman.
--
Brian Noble
Tech Support Engineer
[EMAIL PROTECTED]
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs