sandy105 has asked for the wisdom of the Perl Monks concerning the following question:
i have the following signature log file .i need to extract specific portion of the log file ,namely the first square baracket,second square bracket and the last patch of code after third square bracket
log signature
[part1-date] info - [..part2..] [..part3..] part4
[part1-date] log - [..part2..] [..part3..] part4
foreach (@lines) { $_ =` /\[([^]]+)\] \[([^]]+)\] \[([^]]+)\] (.*)/ || next my ($part1,$part2,$part3) = ($1,$2,$4);
this is what i have ,i cant seem to get correct result
do i have to take care of " info - " || " log - "
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RegEX Doubt
by hippo (Archbishop) on Aug 19, 2014 at 12:12 UTC | |
|
Re: RegEX Doubt
by Athanasius (Archbishop) on Aug 19, 2014 at 12:07 UTC | |
by sandy105 (Scribe) on Aug 19, 2014 at 15:58 UTC | |
|
Re: RegEX Doubt
by Laurent_R (Canon) on Aug 19, 2014 at 14:54 UTC | |
|
Re: RegEX Doubt
by soonix (Chancellor) on Aug 19, 2014 at 12:44 UTC | |
by sandy105 (Scribe) on Aug 19, 2014 at 15:49 UTC | |
|
Re: RegEX Doubt
by sandy105 (Scribe) on Aug 19, 2014 at 16:11 UTC | |
by Laurent_R (Canon) on Aug 19, 2014 at 18:57 UTC | |
by sandy105 (Scribe) on Aug 20, 2014 at 06:39 UTC | |
by Laurent_R (Canon) on Aug 20, 2014 at 17:43 UTC |