in reply to Re: Re: Re: Re: Re: multi line matching problem
in thread multi line matching problem
And you get -my $text = 'hello this is a multiline message'; $text =~ s/([^\S\n]+|\n)/$1 eq "\n" ? print "New line\n" : print "Whitespaces\n"; $1/gemi;
New line Whitespaces Whitespaces Whitespaces Whitespaces New line Whitespaces
|
|---|