How do I stop the "[" in $Name from being interpreted as a regular expression control character? Remember... $Name is really read from a file so I can't escape it. I need to modify the search, not the source data. Regards, Steve$Name = "[A"; $SearchInHere = "FredJimBert"; if ($SearchInHere =~/$Name/) { DoSomething(); }
In reply to Stop variable expansion by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |