I have Cisco debug files and Cisco call manager log files which come in the form of multiple line entries separated by a timestamp at the start of each paragraph. The timestamp can act as a SEPARATOR for the PARAGRAPHS that make up the input text. the inout text has the form
etc.4579958: Jul 11 16:00:27.027 AEST:
<0 or more lines of text>
4579959: Jul 11 16:00:27.027 AEST:
<0 or more lines of text>
4579960: Jul 11 16:00:27.027 AEST:
<0 or more lines of text>
4579961: Jul 11 16:00:27.027 AEST:
<0 or more lines of text>
4579962: Jul 11 16:00:27.027 AEST:
<0 or more lines of text>
4579963: Jul 11 16:00:27.027 AEST:
Lexicon:
SEPARATOR = The timestamp above. This can act as a separator between paragraphs
PARAGRAPH = All the text, starting at the beginning of the SEPARATOR defined above, ending at the beginning of the next SEPARATOR.
SEARCH_STRING = A string of text to search for within the text file(s)
I want to setup TPP so that it searches the input file(s) and give as an output every paragraph containing the SEARCH_STRING.
My preference is perl regex.
Grateful for any ideas regarding how I might tackle this?
Many thanks