Tham, Philip wrote:

I have a variable $var1 containing a string with the text below

I am trying to remove all the text before the work authors

Whatever I am using does not seem to work

$var1 =~ s/^*.4160 //.;
$var1 =~ s/\smodules*.$//;



2005-02-08 online since 1995-10-26 2734 MB 271 mirrors 4160 authors 7585 modules

You could do it like this:

( $var1 ) = $var1 =~ /(authors \d+)/;



John
--
use Perl;
program
fulfillment

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




Reply via email to