- or download this
my $re = qr/a/;
...
say "A" =~ /$pat2/ || 0; # 0
say "a" =~ /$pat2/i || 0; # 1
say "A" =~ /$pat2/i || 0; # 1 XXX
- or download this
my ( $pat, $flags ) = re::regexp_pattern( $re );
- or download this
my $re = eval "no re; qr/\$pat/$flags";