in reply to Two line match

Here is a one-liner you can try. Interchange quotes(' vs ") if on Linux:
perl -ne "next unless /ghjghjgkhgkghj/../fsgdfgsdfgdfsgdsfg/;chomp;pus +h @l,$_;END{$r=join '', @l[1..$#l-1];print $r}" Your-file-name-here
Note the use of the flip-flop operator .. to select stuff between the tokens, and array slicing to avoid the delimiters.

     "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom

Replies are listed 'Best First'.
Re^2: Two line match
by jrosenfeld (Initiate) on Mar 10, 2008 at 20:45 UTC
    Thank you for all of the help