in reply to please help multiple lines parsing
I see a couple of things in your attempt that may be the problem. First, if the line actually starts ".header", you want to start your regex with m/^\.header; otherwise, you'll get false matches on "\npheader", etc., since the . will match any character. Second, your .* may match many lines worth of data. To limit it to the remainder of the .header line, say ([^\n]*\n) instead, or remove the //s flag and say (.*)\n.
Since both of these changes will cause it to match fewer inputs instead of more, if your problem is that it isn't matching at all, this won't help. Do you have your entire input in $_? If you only read one line at a time, a regex that is supposed to match across lines isn't going to do what you want.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: please help multiple lines parsing
by member2004 (Initiate) on Jan 26, 2004 at 19:08 UTC |