This question is different from the "normal" parse new lines in a string because this question uses three different regular expression strings to parse a single line of text... which may or may not have multiple lines
I have the following log entries and would like to have a regular expression that parses both of them... currently it only parses the first line.
Here are the log entries
NOTE: the second log entry has a hard return ("\r\n") in it
[2018-05-25 08:23:54.6040][Manager.Calls.Manager][GetManagerID]
[2018-05-25 08:23:54.6040][Manager.Calls.Manager][Status as of 5/25/2018 8:23:54 AM
Expires 1/1/0001 12:00:00 AM]
Here is the regular expression that I am currently using:
(\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{4}\])\[(.*?)\]\[(.*?)\]
I think I need something to get the "\r\n" line endings...
Here is how I am calling Regex
match = Regex.Match(logEntryText, pattern, RegexOptions.Compiled | RegexOptions.Multiline);
More info:
I tried this for the last reg expression
\[(.*?)(\n|\r|\r\n)\]
but it too fails