Hi,
I am working on logs so the logs can be of just one line or multiple lines and if it is of one line I wanted to take whole log where as if the log has multiple lines I wanted to consider only the first 2 lines.
please tell a possible solution using regex.
thanks in advance.
| rex "^(?<lines>[^\n]+(\n[^\n]+)?)"
| rex "^(?<lines>[^\n]+(\n[^\n]+)?)"