Matching multiple lines with regexp

Discussion in 'Perl Misc' started by lcs Mixmaster Remailer, Feb 11, 2004.

  1. If I want to match two words appearing on two lines, how's it done?

    dog
    cat


    if $match =~ /^dog . . . \n . . . cat/ . . . ????????????????????
     
    lcs Mixmaster Remailer, Feb 11, 2004
    #1
    1. Advertising

  2. lcs Mixmaster Remailer <> wrote:

    > If I want to match two words appearing on two lines, how's it done?



    perldoc -q line

    I'm having trouble matching over more than one line. What's wrong?

    How can I pull out lines between two patterns that are themselves on
    different lines?


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Feb 11, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joao Silva
    Replies:
    16
    Views:
    363
    7stud --
    Aug 21, 2009
  2. Nikita Synytskyy

    Deleting lines matching regexp.

    Nikita Synytskyy, Feb 2, 2004, in forum: Perl Misc
    Replies:
    4
    Views:
    115
    gnari
    Feb 2, 2004
  3. Stephen Moon

    matching multiple lines as one record

    Stephen Moon, Feb 27, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    80
    Brad Baxter
    Mar 3, 2004
  4. H.S.
    Replies:
    9
    Views:
    115
  5. Bobby Chamness
    Replies:
    2
    Views:
    231
    Xicheng Jia
    May 3, 2007
Loading...

Share This Page