in reply to Re^2: regexp over multiple lines
in thread regexp over multiple lines

If I'm forced to process the file line by line instead of "slurp"ing the file, does that mean I can't regexp over multiple lines?
If you are visiting your relatives one by one, are you having a family reunion?

Unless you concatenate the lines yourself, it's not going to work. There's no magic in the regular expression engine that says, "hmmm, I'm not going to match this line, I'm just going to read one more line from the input to see whether it matches now".

Replies are listed 'Best First'.
Re^4: regexp over multiple lines
by liverpaul (Acolyte) on Aug 03, 2011 at 08:27 UTC

    I have to visit my relatives one by one, but sometimes I need to check ahead on Grandma because she's old :-)

    I think I'll have a look at concatenating the lines myself, that might be what I'm after. Thanks.