with inputmy $re = <STDIN>; chomp ($re); my $line = <STDIN>; chomp ($line); print "$line =~ /$re/\n"; if ( $line =~ /$re/ ) { print "match"; } else { print "no match"; }
givesa\d3 a23
a23 =~ /a\d3/ match
In reply to Re: User configurable regex
by Joost
in thread User configurable regex
by MiggyMan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |