Do you really want a regex match or are you actually trying to perform a substring match? If the latter, then consider index instead.
#!/usr/bin/env perl use strict; use warnings; my $str = 'You say *hello, but you mean *goodbye.'; my $substr = '*hello'; print "match\n" if index ($str, $substr) > -1;
🦛
In reply to Re: regex matching on metacharacters
by hippo
in thread regex matching on metacharacters
by slugger415
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |