Testcase:
use strict;
use warnings;
use Regexp::Common qw(IRC);
my @targets = ( 'jto@poco.server.irc', '#channel', 'moo', 'eek!~eek@wanker.co.uk' );
foreach my $target ( @targets ) {
if ( my @matches = $target =~ /$RE{IRC}{msgto}{-keep}/ ) {
print "$target: ", join / /, @matches, "\n";
}
}
Produces the following error:
/ / should probably be written as " " at test_regexp_irc.pl line 8.
Unmatched ) in regex; marked by <-- HERE in m/((?:(?:[#+&]|!(?:[A-Z]|[0-9]){5})[\x{01}-\x{07}\x{08}-\x{09}\x{0B}-\x{0C}\x{0E}-\x{1F}\x{21}-\x{2B}\x{2D}-\x{39}\x{3B}-\x{FF}]{1,29}(?::[\x{01}-\x{07}\x{08}-\x{09}\x{0B}-\x{0C}\x{0E}-\x{1F}\x{21}-\x{2B}\x{2D}-\x{39}\x{3B}-\x{FF}]{1,29})?|(?:(?:[\x{01}-\x{09}\x{0B}-\x{0C}\x{0E}-\x{1F}\x{21}-\x{3F}\x{41}-\x{FF}])?[%(?:(?:(?:[A-Za-z]|[0-9])(?:[A-Za-z]|[0-9]|-)*(?:[A-Za-z]|[0-9])*(?:.(?:[A-Za-z]|[0-9])(?:[A-Za-z]|[0-9]|-)*(?:[A-Za-z]|[0-9])*)*)|(?:(?:[0-9]){1,3}.(?:[0-9]){1,3}.(?:[0-9]){1,3}.(?:[0-9]){1,3})|(?:(?:(?:[0-9]|[A-F])(?::(?:[0-9]|[A-F])){7})|(?:0:0:0:0:0:(?:0|FFFF):(?:[0-9]){1,3}.(?:[0-9]){1,3}.(?:[0-9]){1,3}.(?:[0-9]){1,3})))) <-- HERE )]@(?:(?:[A-Za-z]|[0-9])(?:[A-Za-z]|[0-9]|-)*(?:[A-Za-z]|[0-9])*(?:.(?:[A-Za-z]|[0-9])(?:[A-Za-z]|[0-9]|-)*(?:[A-Za-z]|[0-9])*)*)))|(?:(?:[\x{01}-\x{09}\x{0B}-\x{0C}\x{0E}-\x{1F}\x{21}-\x{3F}\x{41}-\x{FF}])?%(?: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