I'm trying to find all occurrences of following pattern [int]$license in a script located on multiple machines. When I run $test | select-string -pattern '/[int/]' where $test holds the content of the file, this works as long as I won't add the dollar sign afterwards. I tried '/[int/]/$license' and '/[int/]`$license' but neither works which proves my regex is useless :) Can someone help with this?