http://www.perlmonks.org?node_id=481855


in reply to Re^5: Parse::RandGen::Regexp
in thread Parse::RandGen::Regexp

Shouldn't that be
(?smi:^STOR\s[^\n]{100})

Replies are listed 'Best First'.
Re^7: Parse::RandGen::Regexp
by Tanktalus (Canon) on Aug 08, 2005 at 14:04 UTC

    You made me go back to perlre again - I knew I had looked it up when giving the original answer, but you made me second guess myself. ;-) Turns out, we're both right. Without the colon, the directive applies to the end of the current block (capturing or non-capturing parenthesis). With the colon, of course, it applies only to that non-capturing block.