note
tinita
<blockquote><i>
</i></blockquote>
Because I recently learned about <c>regexp_pattern</c> (see [http://perlmonks.org/?node_id=1204940|thread]), this might work, but it might not handle every case (there are other flags besides "u"):
<code>
use re ();
for (1..10) {
my ($pat, $flags) = re::regexp_pattern($rex);
$rex = ($flags eq "u" or $flags eq "") ? qr{$pat.} : qr{$rex.};
}
</code>
1205185
1205185