Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Matching multiple lines with regexp

Reply
Thread Tools

Matching multiple lines with regexp

 
 
lcs Mixmaster Remailer
Guest
Posts: n/a
 
      02-11-2004
If I want to match two words appearing on two lines, how's it done?

dog
cat


if $match =~ /^dog . . . \n . . . cat/ . . . ????????????????????



 
Reply With Quote
 
 
 
 
Tad McClellan
Guest
Posts: n/a
 
      02-11-2004
lcs Mixmaster Remailer <(E-Mail Removed)> 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
http://www.velocityreviews.com/forums/(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[regexp] How to convert string "/regexp/i" to /regexp/i - ? Joao Silva Ruby 16 08-21-2009 05:52 PM
Help with Pattern matching. Matching multiple lines from while reading from a file. Bobby Chamness Perl Misc 2 05-03-2007 06:02 PM
matching HTML expression across multiple lines H.S. Perl Misc 9 05-11-2006 04:12 PM
matching multiple lines as one record Stephen Moon Perl Misc 3 03-03-2004 02:41 AM
Deleting lines matching regexp. Nikita Synytskyy Perl Misc 4 02-02-2004 07:43 PM



Advertisments