use strict;
my $str = '[11:51] <Lucas807> ๐๐๐จ๐ผ;๐จ๐ด ๐ข๐๐ ๐ญษช๐ค๐ญ๐ ๐ด๐ฆ๐ ๐๐๐๐๐ส๐๐.๐๐ฃ
[11:51] <Lucas807> ๐๐๐ด๐ผ;๐๐ ๐๐ด๐ แด
๐๐ค๐กแด ๐๐ถ๐ฏ ๐แด๐๐ฐ๐จ๐ฏ๐บแด.๐ฃ๐
[11:49] <Damien537> ๐ด๐ธ๐ด๐;๐ด๐ ๐๐๐ฑ ๐น๐๐ฐ๐๐ธ s๐๐ฃ ๐๐๐ผ๐๐๐๐ฎ๐ถ.า๐ฃ
[11:49] <Damien537> ๐๐ฌ๐ด๐;๐จ๐ฐ ๐ฆ๐ฐ๐ ๐ก๐๐๐๐ ๐๐๐ฃ ๐ค๐ธ๐ธ๐ฌ๐๐ฃ๐ฎ๐.๐ฃ๐ฃ
[11:48] <Axel937> ๐ฌ๐๐๐;ษข๐ค ๐ฎ๐๐ ๐ฑ๐๐ค๐๐ ๐๐ถ๐ ๐๐ฌ๐ธ๐๐จ๐ณ๐ช๐ช.๐ฏ๐ฟ
[11:48] <Axel937> ๐ด๐ ๐๐;๐๐ด ๐ฎ๐ฐ๐ ๐ก๐๐๐นแด ๐ด๐ถ๐ ๐ผแด๐๐๐๐แด๐.าส
[11:46] <Leon231> ๐ด๐๐ธ๐;๐๐ ๐ฆ๐๐ฝ ๐๐๐ผ๐ญ๐ฐ ๐ฐ๐๐ฟ แด๐ฐ๐ ๐ผ๐ด๐๐ฎ๐.๐ป๐
[11:46] <Leon231> ๐๐ธ๐ฌ๐ธ;๐๐ฐ ๐พ๐ผ๐ ๐ก๐๐๐น๐ ๐ผ๐พ๐ณ ๐ธ๐๐ฐแด๐๐๐ฎ๐.๐๐ฟ
[11:44] <Maxime678> ๐ธ๐๐จ๐ ;๐๐ ๐ข๐๐ แด
๐ฒ๐ค๐๐ธ s๐๐ ๐ธ๐๐๐๐ด๐๐ถแด.๐๐
[11:44] <Maxime678> ๐จ๐๐๐ฐ;๐ค๐ด แด๐๐ ๐ฅ๐๐ผ๐๐ ๐๐๐ฏ ๐ ๐๐๐ธ๐ฐ๐ป๐แด.๐ฏ๐
[11:43] <Hugo645> ๐๐ ๐๐ฌ;๐๐ ๐s๐ฅ ๐ฝ๐๐๐๐ ๐๐๐ ๐แดแด๐๐ด๐๐๐ฎ.า๐
[11:43] <Hugo645> ๐จ๐ผ๐ธ๐ผ;๐๐จ ๐ข๐๐ฝ ๐ษช๐ฐแด๐ ๐๐ข๐ ๐๐ผ๐๐๐๐๐๐.๐๐
[11:41] <Tristan549> ๐แด๐๐;๐๐ฐ ๐๐ฐ๐ ๐๐๐๐
๐ผ ๐ฐ๐๐ป ๐ฐแด๐ธ๐๐๐๐๐บ.๐ฃ๐ฃ
[11:41] <Tristan549> ๐๐ผ๐๐;ษข๐ ๐๐ด๐ แด
๐๐ค๐๐ ๐ ๐พส ๐๐๐ธ๐ผ๐๐ป๐ช๐บ.๐๐
Test sans caractรจres bizarres
Et ๐ชv๐c';
my $regex = qr/[\x{0200}-\x{FFFF}]/mip;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html