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"; } }
In reply to Re: Regex - remove characters (pattern not terminated) perl6
by eric256
in thread Regex - remove characters (pattern not terminated)
by twaddlac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |