1#!./perl 2use strict; 3use warnings; 4 5$| = 1; 6 7 8BEGIN { 9 chdir 't' if -d 't'; 10 require './test.pl'; 11 set_up_inc( '../lib', '.', '../ext/re' ); 12} 13 if (is_miniperl()) { 14 skip_all_if_miniperl("Unicode tables not built yet", 2) 15 unless eval 'require "unicore/UCD.pl"'; 16 } 17 18plan tests => 3; 19use strict; 20 21my(@body) = ( 22 "<mailto:xxxx.xxxx\@outlook.com>", 23 "A\x{B9}ker\x{E8}eva xxxx.xxxx\@outlook.com \x{201D}", 24); 25 26for (@body) { 27 s{ <? (?<!mailto:) \b ( [a-z0-9.]+ \@ \S+ ) \b 28 (?: > | \s{1,10} (?!phone) [a-z]{2,11} : ) }{ }xgi; 29 my $got= $1; 30 is( $got, '.xxxx@outlook.com' ); 31} 32ok("got to the end without dieing (note without DEBUGGING passing this test means nothing)"); 33 34