Re: help about regex matching
- From: "xicheng" <xicheng@xxxxxxxxx>
- Date: 28 Nov 2005 23:53:15 -0800
Based on your code, you can do the following:
{
local $/="", $\="\n";
while (<FILE>)
{
#next unless /^(.+?)$(?=.*(\d+\.\d+\.\d+\.\d+))/sm;
#print $1,"\t",$2,"\n";
chomp;
tr/\n/\t/;
print;
}
}
#or use one-liner as
perl -lp00e 'tr/\n/\t/' mydata.txt
XC
.
- References:
- help about regex matching
- From: Jeff Pang
- help about regex matching
- Prev by Date: RE: Matching a Scalar Variable
- Next by Date: Re: reading a hash
- Previous by thread: Re: help about regex matching
- Next by thread: Re: help about regex matching
- Index(es):