-----Original Message----- From: news [mailto:[EMAIL PROTECTED] Behalf Of prabu Sent: Wednesday, April 07, 2004 9:35 AM To: [EMAIL PROTECTED] Subject: Matching pattern in multiple lines
Hello All, Thanks for the useful informations given on my previous queries.Now I have another one query. Please help me. In pattern matching,I want to match a pattern in multiple line.How to do this?. For example,in a file,the pattern is present in 2 lines, Here my doubts are: 1.Whether need to use "/n" to distinguish between 2 lines,when decalring them? Or anyother operator needed to be used?. (ie) $pattern="text in 1st line "/n" text in secondline"; $replace="some text"; 2. Whether to specify any options in the "s/$pattern/$replace/g" command? Thanks inadvance, Prabu. It is not "/n" but "\n" USE : $*=1; Don't use \n, but you can use '^'to match just after '\n' thanks, Jay -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>