my $foo = '$@!#@#$^$#@^';
..and I want to incorporate it into a regular expression such that the characters of the string will be matched literally, no matter what characters they are.
ie
my $bigfoo='aabbaaa$@!#@#$^$#@^bbabaaba'; assert $bigfoo =~ /(a|b)*$foo(a|b)*/;
What is the correct way to interpolate a string literal into a regular expression?
Thanks,
-Andrew.
In reply to Using string literal in regexp by tomazos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |