http://qs321.pair.com?node_id=847340


in reply to Regex - remove characters (pattern not terminated)

Just playing around with Perl6 some

#!/home/ejh/rakudo/perl6 my @temp = ("1234567", "7654321"); my $pat = "123"; my $rpat = "321"; for @temp -> $test { print "Testing '$test' - "; my $t = $test; if $t ~~ s/$pat// or $t ~~ /$rpat/ { say "($t) matched"; } }

___________
Eric Hodges