http://qs321.pair.com?node_id=308267


in reply to Re: Re: how do I check for this rule
in thread how do I check for this rule

Or just:
$str !~ /XXX(?!\s*\n+YYY)/;

Abigail