Re:regexp needed

2004-06-22 Thread Goncalves, Jorge (Ext)
Hi List , I have this to print: 1 2 3 with this script but it didn't work: #!/usr/bin/perl use strict; use warnings; { local $/; my $file = ; while ($file =~ /^\s+(\d+).(.+)$/) { print $1\n if $2 =~ /extractStat/; } } __DATA__ ?tatID Jour

Re:Regexp needed

2002-05-23 Thread Jorge Goncalvez
Hi, i have this: open INFILE, "< $_Globals{SYSLOG}" or die $!; #ModifiedFile(); while () { if (/([0-9a-z:]+)\s*via eth0)/) { $_Globals{MAC_ADDR} = $1; } } And my file is like this: . LOG_INFO : BOOTREQUEST from 00:80:9f:2e:0f:9c via eth0 .

Re:regexp needed

2002-05-14 Thread Jeff 'japhy' Pinyan
On May 14, Jorge Goncalvez said: >SceInfGuest = "Guest" >my $HISEFILE= "c:/hisecdc.inf"; > open HISE,"< $HISEFILE" > or die "je ne peux ouvrir $HISEFILE :$!"; >while () { > if (/SceInfGuest\s+:\s([0-9a-z]+);/i) { >print "found $1 \n"; > > } >}

Re:regexp needed

2002-05-14 Thread Jorge Goncalvez
Hi, I have a file like this: ... SceInfEveryone = "Everyone" SceInfGuests = "Guests" SceInfGuest = "Guest" SceInfPowerUsers = "Power Users" SceInfPrintOp = "Print Operators" .. And I wanted to extract Guest (without the quotes)i tried this: my $HISEFILE= "c:/hisecdc.inf"; ope

Re:regexp needed

2002-04-26 Thread Felix Geerinckx
on Fri, 26 Apr 2002 09:05:29 GMT, [EMAIL PROTECTED] (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 -- To un

Re:regexp needed

2002-04-26 Thread Jorge Goncalvez
HI, I have a file like this: . 1015322638: in.tftpd : Win32 Process Id = 0xBF : Cygwin Process Id = 0xBF : RRQ from 192.40.54.42 filename /bootp/linux/4.0/alize/initrd.img (in.tftpd) .. And I wanted to match what is between from and filename ie 192.40.54.42 and what comes after filema

re:Regexp needed

2002-03-05 Thread Jorge Goncalvez
hi, i have this: my ($Path) = $MountsPath =~ /(.+?)cygwin/; but I wanted to get rid of the "/". because $MountsPath could be c:/cygwin or c:/xyz/cygwin or c:/xyz/zyx/cygwin and i wanted $Path = c: or c:/xyz or c:/xyz/zyx . And now $Path= c:/ or c:/xyz or c:/xyz/zyx. How can I do ? thanks. -- T