in reply to Searching for paragraphs but tricky

Are you sure your file isn't in DOS format (ie. CRLF terminators)?

  • Comment on Re: Searching for paragraphs but tricky

Replies are listed 'Best First'.
Re^2: Searching for paragraphs but tricky
by rubydba (Initiate) on Jul 19, 2013 at 21:42 UTC
    I did state that it's Linux and it's not a DOS file.

      Hence the question. :)

      Anyway, there's nothing wrong with your syntax as this trivial example demonstrates:

      $ echo -e "CREATE TABLE WCC.CONTACT\nfoo\n;\nCREATE TABLE WCC.CONTACTM +ETHOD\nbar\n;\n" | perl -ne 'print if /CONTACT$/ .. /;/;' CREATE TABLE WCC.CONTACT foo ;

      Therefore the obvious conclusion is that your input file does not contain what you think it contains. Use a hexdump to see what's actually in there.