Perl has a function called
metaquote() to escape all special characters for a regular expression.
Is there an equivalent technique for
Example: If I am searching for the string
abc.def.ghi, I need to remember to escape the dots manually, e.g.,
egrep does not have a built-in mode/feature to do this, but I am open to "one-liners" in Perl/sed/awk to simulate
egrep. Also, Perl's
metaquote() might work in trivial cases, but the regular expression syntax is different between