Re: Matching Over Multiple Lines

2009-03-17 Thread John W. Krahn
Jeff Westman wrote: All, Hello, I know this has been asked many times, and I have read the documentation ("perldoc -q "matching over more than one line") and still can't make head or tails out of this. I have a problem where my pattern can be in one line, or span multiple lines. This is wha

Re: Matching Over Multiple Lines

2009-03-17 Thread Chas. Owens
On Tue, Mar 17, 2009 at 13:55, Bob McConnell wrote: > From: Chas. Owens >> >> Perl doesn't start having problems with files until you start getting >> into areas that the OS has problems with those files.  Your machine, >> however, may have problems if it does not have enough memory.  I >> remembe

RE: Matching Over Multiple Lines

2009-03-17 Thread Bob McConnell
From: Chas. Owens > > Perl doesn't start having problems with files until you start getting > into areas that the OS has problems with those files. Your machine, > however, may have problems if it does not have enough memory. I > remember working on a production machine that only had eight megab

Re: Matching Over Multiple Lines

2009-03-17 Thread Chas. Owens
On Tue, Mar 17, 2009 at 12:39, Jim Gibson wrote: snip > A file of length 10MB should be no problem for Perl. snip Perl doesn't start having problems with files until you start getting into areas that the OS has problems with those files. Your machine, however, may have problems if it does not ha

Re: Matching Over Multiple Lines

2009-03-17 Thread Jim Gibson
On 3/17/09 Tue Mar 17, 2009 8:45 AM, "Jeff Westman" scribbled: > All, > > I know this has been asked many times, and I have read the documentation > ("perldoc -q "matching over more than one line") and still can't make head > or tails out of this. > > I have a problem where my pattern can be

Matching Over Multiple Lines

2009-03-17 Thread Jeff Westman
All, I know this has been asked many times, and I have read the documentation ("perldoc -q "matching over more than one line") and still can't make head or tails out of this. I have a problem where my pattern can be in one line, or span multiple lines. This is what I have so far (simplified):

Re: Regular Expresssion - Matching over multiple lines

2004-05-18 Thread Jeff 'japhy' Pinyan
On May 18, James Edward Gray II said: >On May 18, 2004, at 9:30 AM, Andrew Gaffney wrote: > >> Doesn't the 'gc' modified make the whole think not as greedy? As a >> side effect of continuation, doesn't it try to match as many times as >> possible? > >I'm not familiar with this, but my gut reaction

Re: Regular Expresssion - Matching over multiple lines

2004-05-18 Thread James Edward Gray II
On May 18, 2004, at 9:30 AM, Andrew Gaffney wrote: Doesn't the 'gc' modified make the whole think not as greedy? As a side effect of continuation, doesn't it try to match as many times as possible? I'm not familiar with this, but my gut reaction is no. Perhaps on of the Regex experts can clear

Re: Regular Expresssion - Matching over multiple lines

2004-05-18 Thread Andrew Gaffney
James Edward Gray II wrote: On May 17, 2004, at 11:16 PM, Andrew Gaffney wrote: Roman Hanousek wrote: Hi All I have bunch of files that contain code like this: What I am trying to do is match then check that this piece of code contains a alt= tag. And if it doen't print the lines where it's m

Re: Regular Expresssion - Matching over multiple lines

2004-05-18 Thread James Edward Gray II
On May 17, 2004, at 11:16 PM, Andrew Gaffney wrote: Roman Hanousek wrote: Hi All I have bunch of files that contain code like this: What I am trying to do is match then check that this piece of code contains a alt= tag. width="9" height="6" alt="${string

Re: Regular Expresssion - Matching over multiple lines

2004-05-17 Thread Andrew Gaffney
Roman Hanousek wrote: Hi All I have bunch of files that contain code like this: What I am trying to do is match then check that this piece of code contains a alt= tag. And if it doen't print the lines where it's missing to screen or file. while($input =~ ||sgc) { print "Missing ALT\n" if(

Regular Expresssion - Matching over multiple lines

2004-05-17 Thread Roman Hanousek
Hi All I have bunch of files that contain code like this: What I am trying to do is match then check that this piece of code contains a alt= tag. And if it doen't print the lines where it's missing to screen or file. Cheers any help appreciated. -- To unsubscribe, e-mail: