then escape the unicode in the regex:
use warnings;
use strict;
use utf8;
my $string = '看【厂家直销 儿童加绒加厚打底裤 中小童冬季】Ib';
binmode STDOUT, ':encoding(UTF-8)';
while ($string =~ /\x{3010}(.*?)\x{3011}/g) {
print "Match: $string\n";
}
(I left the use utf8 so that I could easily include the same string that choroba did. However you get the string is fine)
In reply to Re^3: String match in Chinese character
by pryrt
in thread String match in Chinese character
by hankcoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |