Hope the sed or awk gurus can help me out. I need to match a multiple line pattern in which the pattern range can span from one to three lines. I am not able to arrive at the result using pcregrep! The pattern I want to realise goes somewhat like this =>
\s*\w+\s\w+\([A-Za-z,]*\)\s*\;\{
The thing is that after the words or the semicolon, the following part of the pattern can or cannot occur in the next line AND the pattern can occur in a single line too, depending on the file.
Thanks in advance for the replies. I have been stuck at this step for almost a week! Any kind of suggestions appreciated :)
Eg : apple orange(plum); kiwi {
OR
apple orange(plum);
kiwi
{
An expression to match both expressions.