i have issue parsing log file. problem cells spread on several strings of file.
is there way value in red square using regular expression?
couldn't resist, wrote simple example ;). it's not beautiful, might suit needs. check out @ dotnetfiddle. note text doesn't match yours, , need set maximum number of lines in one log entry. done regulating number of (?:\s+?(\s.*?)\n)?
ending re, number of additions of groups in output.
the regex:
\d+\s+\d+\s+\w+\s+\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}\s+\d+\s\d+\s(.*?)success\d{4}.*?\n(?:\s+?(\s.*?)\n)?(?:\s+?(\s.*?)\n)?(?:\s+?(\s.*?)\n)?(?:\s+?(\s.*?)\n)?
a simple explanation matches line starting digit, skipping columns "mml command" , captures "successnnnn". optionally matches following rows (up 5 of them) beginning space.
hope helps.
regards.
Comments
Post a Comment