----- Original Message ----- 
From: "Rod Za" <[EMAIL PROTECTED]>
Newsgroups: perl.beginners
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 6:15 PM
Subject: regex in perl.


> Hello,
>
> Someone know how can i search this in a file using regex?

Hello Rod,
My head must've been in the clouds  :-(

This code will do what you want.

while (<DATA>) {
     if (/%!/ || /\004%!/ || /\033%-12345X%!PS/ ||
/LANGUAGE\s?=\s?POSTSCRIPT/i) {
          print;
     }
}

__DATA__
rrrr%!sssss
yyy question \033%-12345X%!PSttt
-----------------------
XXXXXXXXXXXXXXXX
LANGUAGE=POSTSCRIPT
LANGUAGE = postscript

Chris




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to