in reply to Re^2: Make a variable safe for a regex.
in thread Make a variable safe for a regex.
Can you supply a test case for that? I've tried (shortly) and it seems to work for me:
C:\>perl -le "my $str = qq(foo\x{100}bar); my $re = qr/^\Q$str\E/; war +n $str; warn $re; warn $str =~ /$re/;" foo─Çbar at -e line 1. (?-xism:^foo─Çbar) at -e line 1. 1 at -e line 1.
Maybe it fails for some other cases of unicode chars, and if so I'd consider that a bug.
|
|---|