is equivalent toindex($str, $substr) >= 0
and$str =~ /\Q$substr\E/
my $re = quotemeta($substr); $str =~ /$re/
In reply to Re: How to escape metacharacters without backslash it in regex?
by ikegami
in thread How to escape metacharacters without backslash it in regex?
by aurekha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |