in reply to regex matching on metacharacters
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;
🦛
|
|---|