Thanks Xavier. I created two different "regex parsers" for now to handle these
[in] is the in or out messages sent by the system. They can be part of the message. This is the parser I wrote for [in] messages
(\S+ \S+) (.*?) (.*?)
Search found 4 matches
- Thu Feb 02, 2017 4:02 pm
- Forum: Writing a Parser
- Topic: Writing a regex parser to Parse multiple lines
- Replies: 6
- Views: 25868
- Wed Feb 01, 2017 3:16 pm
- Forum: Writing a Parser
- Topic: Writing a regex parser to Parse multiple lines
- Replies: 6
- Views: 25868
Re: Writing a regex parser to Parse multiple lines
SO I verified that also works. Thanks a lot. One more thing for now. Here is another log. I would like to merge this view with the first log I provided. The parser you mentioned would not work for this (\S+ \S+) \[(\S+?)\]: (.*) Is there a parser which can work on both of these simultaneously so tha...
- Wed Feb 01, 2017 2:27 pm
- Forum: Writing a Parser
- Topic: Writing a regex parser to Parse multiple lines
- Replies: 6
- Views: 25868
Re: Writing a regex parser to Parse multiple lines
Thanks Xavier. Will this be able to handle following also?
2017-01-25 01:55:43.883 [ERROR]: transport error:
***********
Here is a banner
**********
2017-01-25 01:56:43.883 [DEBUG]: Syslog logs
2017-01-25 01:55:43.883 [ERROR]: transport error:
***********
Here is a banner
**********
2017-01-25 01:56:43.883 [DEBUG]: Syslog logs
- Tue Jan 31, 2017 8:17 pm
- Forum: Writing a Parser
- Topic: Writing a regex parser to Parse multiple lines
- Replies: 6
- Views: 25868
Writing a regex parser to Parse multiple lines
Hi, I have a following block which I want to parse 2017-01-25 01:55:43.883 [ERROR]: transport error: System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection...