J
Jason Newell
All,
I'm needing a little help parsing a log file using Regex. Here is an
example line from the log.
[2010-05-21 02:42:15,307] [WARN,CommandHandler] Duplicate entry
I want to simply break the line into the following chunks:
[2010-05-21 02:42:15,307]
[WARN,CommandHandler]
Duplicate entry
I've tried the following Regex is some success:
\[[^\]]*\]
(?<DateTime>\[[^\]]*\]) (?<Message>.*)
I've already spent quite a bit of time on my own trying to figure it
out. Thanks for any help.
Jason Newell
www.jasonnewell.net
I'm needing a little help parsing a log file using Regex. Here is an
example line from the log.
[2010-05-21 02:42:15,307] [WARN,CommandHandler] Duplicate entry
I want to simply break the line into the following chunks:
[2010-05-21 02:42:15,307]
[WARN,CommandHandler]
Duplicate entry
I've tried the following Regex is some success:
\[[^\]]*\]
(?<DateTime>\[[^\]]*\]) (?<Message>.*)
I've already spent quite a bit of time on my own trying to figure it
out. Thanks for any help.
Jason Newell
www.jasonnewell.net