Jump to content

PHP Source code search


dptr1988

Recommended Posts

Does anyone know of an program that will allow me to search for terms within a specific part of PHP source code? Like in comments, strings, variable names, etc?

 

I am needing to rebrand an program, but since the old name is everywhere (500+ files), I am just wanting to search for the old name in strings and outside of the <?php and ?> tags.

 

Is this someting that I could do with grep/regular expressions? Or is it too hard to make a regular expression that can handle PHP code?

Link to comment
https://forums.phpfreaks.com/topic/103282-php-source-code-search/
Share on other sites

Yes, I know how to use grep or equivalent file content searching programs, like KFileReplace.  I was wondering if there was a regular expression or program that would allow you to search in specific parts of PHP source code like comments, strings, identifiers.

 

I did find a way to do the rebranding. With a couple of different searches, I was able to find ( hopefully ) all references to that name, but I had to manually sort through hundreds of hits in comments and variable/constant identifiers and that is what I was hoping to avoid.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.