A Regex object represents a regular expression, which is fully Perl5 compatible.
/^my?\s*re(g|[ex])\z/i
Alternatively:
Regex('^my?\s*re(g|[ex])\z', 'i')
Last updated 4 years ago