tcf03 has asked for the wisdom of the Perl Monks concerning the following question:
This works fine for lines like:print ("<b>$1</b> $4\n",br) if ( m/(^....$MONTH..+$DAY.$HOUR:$MINUTE:. +.(:..)+.(20..))(.*)/ );
but doesn't match at all on lines like:Tue Apr 12 03:00:46 2005 Event on Socket 2 Begin Processing Client
Note the two spaces between Apr and 7, yet only one between Apr and 12. Ive gotta be missing something obvious here.Thu Apr 7 03:00:39 2005 Event on Socket 2 Begin Processing Client
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pattern matching whitespace
by ikegami (Patriarch) on Apr 13, 2005 at 16:35 UTC | |
|
Re: pattern matching whitespace
by ww (Archbishop) on Apr 13, 2005 at 16:43 UTC | |
|
Re: pattern matching whitespace
by sh1tn (Priest) on Apr 13, 2005 at 16:06 UTC | |
|
Re: pattern matching whitespace
by davidrw (Prior) on Apr 13, 2005 at 16:41 UTC | |
by tcf03 (Deacon) on Apr 13, 2005 at 17:25 UTC | |
by ikegami (Patriarch) on Apr 13, 2005 at 19:37 UTC |