On Mon, Mar 17, 2003 at 12:52:21AM +0100, Louis Pouzin wrote:
> Hi,
> 
> Here is a regex I can't figure out. The intent is to catch all text from
> a line and its continuation if any (in msg headers). In the case here, it
> doesn't work. Anyone could explain ? Thanks.

Your regex uses \s* where it should be using [ \t].  That allows it to
incorrectly match the newline immediately after the colon and then match
the next line as the content of the header.

Try this instead:

my $lgl = '[ \t]*((?:.*?)\n(?:[ \t]+.*?\n)*)';

Ronald

Reply via email to