I want to search all files in the current directory and below for the substring $form['#node']
. So, I have tried, initially:
grep -R "\$form\[\\\\'" .
and grep -R "\$form\[\'" .
But it returns no results. However,
grep -R "\$form\["
returns plenty of results, as there are instances of entries such as $form['#id']
or $form['#node']
in the files. Is there any reason why adding the escaped single quote causes an issue? I can't seem to find any clear indication of exactly how to escape a single quote in this case.
I need to check that my escaped characters are working as intended in this scenario.