I've got a string with this text "(7001) - This is some text" and I want to see if it matches this pattern: "([7000|7001|7002]) - This".
Basically, I want to have something like this (which doesn't work).
my $full_text = "(7001) - This is some text"; my $check_str = "([7000|7001|7002|7003]) - This"; if ($full_text =~ /$check_str/) { print "full_text has the check_str\n"; }
Thanks! Derek
In reply to Regular Expression Help by dhackbar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |