develooper Front page | perl.beginners | Postings from April 2002

Re:regexp needed

Thread Previous
From:
Felix Geerinckx
Date:
April 26, 2002 02:29
Subject:
Re:regexp needed
Message ID:
Xns91FC74D296149fge123@209.85.157.220
on Fri, 26 Apr 2002 09:05:29 GMT, goncal11@col.bsf.alcatel.fr (Jorge
Goncalvez) wrote: 

> And I wanted to match what is between from and filename ie
> 192.40.54.42 and what comes after filemane ie

With a dataline in $_:

    	print "$1 $2\n" if /.*from ([\d\.]+) filename ([^ ]+)/;

-- 
felix

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About