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


in reply to Parse::RandGen::Regexp

How do I convert ...

You just did. qr/^STOR\s[^\n]{100}/smi will do nicely. Use it as if it was a string. In other words, you don't need to change anything else.

By the way, please edit your post, changing <pre>...</pre> to <code>...</code>, to save the janitors from doing it for you.