use strict;
my $str = '';
my $regex = qr/(?![\U00002619\U00002661\U00002665\U00002763\U00002764\U00002765\U00002766\U00002767\U00002E96\U00002E97\U00002F3C\U0001F394\U0001F48C\U0001F48F\U0001F491\U0001F493\U0001F494\U0001F495\U0001F496\U0001F497\U0001F498\U0001F499\U0001F49A\U0001F49B\U0001F49C\U0001F49D\U0001F49E\U0001F49F\U0001F4D6\U0001F5A4\U0001F60D\U0001F618\U0001F63B\U0001F970\U0001F9E1])[\U00002600-\U000027BF\U0001f300-\U0001f64F\U0001f680-\U0001f6FF]/p;
if ( $str =~ /$regex/ ) {
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