Search code examples
searchphpstorm

Can I search for a needle in my codebase that only appears within a string in phpStorm?


I want to search occurences of a string in my codebase. Alas, it appears both in variable names and within strings. I want to keep the variable names and change the occurrences in a string.

How to only search for a needle in a string?


Solution

  • There is special option available in PhpStorm v7 and newer (very easy to use):

    Find in Path dialog (search across multiple files) enter image description here

    Quick find -- searches current file only: enter image description here