Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
[Fri Sep 30 14:02:22 2005]Local/ESSBASE0///Info(1051001) Received client request: Logout (from user Procbat)
my regexp get all info of first line, but second line dont return anything mys prints stops in $9
i try C:>type teste.txt|perl ini.pl where teste.txt contains 2 lines.
thanks and sorry for bad english ;D
while (<>) { if (m{ \[ (\w{3}) \s* (\w{3}) \s* (\d{2}) \s* (\d{2}:\d{2}:\d{2})\s* (\d{4}) \] (\w*) \/ (\w*) /// Info(\(\d*\)) (\s*) }xm ){ print "regexp ok\n"; print "$1\n"; print "$2\n"; print "$3\n"; print "$4\n"; print "$5\n"; print "$6\n"; print "$7\n"; print "$8\n"; print "$9\n"; print "$10\n"; print "$11\n"; } }
20051116 Janitored by Corion: Moved from snippets, added formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regexp in win32
by ptum (Priest) on Nov 16, 2005 at 18:55 UTC | |
by lorn (Monk) on Nov 16, 2005 at 19:16 UTC | |
by ptum (Priest) on Nov 16, 2005 at 20:26 UTC | |
by lorn (Monk) on Nov 17, 2005 at 12:48 UTC | |
|
Re: regexp in win32
by ikegami (Patriarch) on Nov 16, 2005 at 18:43 UTC | |
by lorn (Monk) on Nov 16, 2005 at 19:02 UTC | |
by ptum (Priest) on Nov 16, 2005 at 19:08 UTC | |
by ikegami (Patriarch) on Nov 16, 2005 at 19:23 UTC |