| Server IP : 81.2.241.106 / Your IP : 216.73.216.165 Web Server : Apache/2.4.67 (Debian) System : Linux tranq-f.bakta.org 5.10.0-45-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64 User : lisky ( 1002) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/doc/libregexp-assemble-perl/examples/ |
Upload File : |
use v5.14;
use strict;
use warnings;
use Regexp::Assemble;
use Data::Dumper;
my $re = Regexp::Assemble->new(flags => 'i')->track(1);
foreach my $reg (
'(?^ux: Coneheads(?^ux: [^\\p{Alnum}] )(?^ux: [^\\p{Alnum}] )(?^ux: [^\\p{Alnum}] )Dan(?^ux: [^\\p{Alnum}] )Aykroyd(?^ux: [^\\p{Alnum}] )Comedy(?^ux: [^\\p{Alnum}] )Eng )|(?^ux: Coneheads(?:[+]|%20)-(?:[+]|%20)Dan(?:[+]|%20)Aykroyd(?:[+]|%20)Comedy(?:[+]|%20)Eng)',
# 'Coneheads(?^ux: [^\\p{Alnum}] )(?^ux: [^\\p{Alnum}] )(?^ux: [^\\p{Alnum}] )Dan(?^ux: [^\\p{Alnum}] )Aykroyd(?^ux: [^\\p{Alnum}] )Comedy(?^ux: [^\\p{Alnum}] )Eng',
# 'Coneheads(?:[+]|%20)-(?:[+]|%20)Dan(?:[+]|%20)Aykroyd(?:[+]|%20)Comedy(?:[+]|%20)Eng',
'(?^u:Coneheads\\ 1993)',
) {
$re->add( $reg );
}
foreach my $string (
"Coneheads - Dan Aykroyd Comedy Eng",
"Coneheads+-+Dan+Aykroyd+Comedy+Eng",
"Coneheads%20-%20Dan%20Aykroyd%20Comedy%20Eng",
"Coneheads 1993",
) {
if( $string =~ /$re/ ) {
say "matched $string";
if( my $matched = $re->matched() ) {
say "matched with: $matched";
}
if( my $matched = $re->source($^R) ) {
say "\$^R: $^R";
say "match source: $matched";
}
say "work around: ", get_source($re, $string);
}
else {
say "no match on $string";
say "get_source returns: ", get_source($re, $string);
}
say "-" x 70;
}
print Dumper $re;
sub get_source {
my ($re, $string) = @_;
foreach my $r ( @{$re->{mlist}} ) {
if( $string =~ /$r/ ) {
return $r;
}
}
return;
}