PHP Classes

Recursive search

Recommend this page to a friend!

      Search and Replace  >  All threads  >  Recursive search  >  (Un) Subscribe thread alerts  
Subject:Recursive search
Summary:Looking for proper way to setup for recursive searching
Messages:3
Author:Jeff Brown
Date:2012-02-23 14:46:09
Update:2013-11-09 23:46:58
 

  1. Recursive search   Reply   Report abuse  
Picture of Jeff Brown Jeff Brown - 2012-02-23 14:46:10
I noticed the ability to search within directories, although I am a little confused.

I am looking to have it search all *.php files in all sub directories, this is what I have:

$sr = new search_replace($search, '', '*.php');
$sr->set_search_function('quick');
$sr->set_directories(getcwd());
$sr->do_search();

Any tips on that method would be great.

Thank you,

  2. Re: Recursive search   Reply   Report abuse  
Picture of Sean Lee Sean Lee - 2013-11-09 20:41:24 - In reply to message 1 from Jeff Brown
I need the same thing too, need to do recursive search and replace across multiple subdirectories, about 2 levels deep. Need to search all php, js, css. The documentation did not cover it. Any pointer please.

  3. Re: Recursive search   Reply   Report abuse  
Picture of Sean Lee Sean Lee - 2013-11-09 23:46:59 - In reply to message 2 from Sean Lee
I got as far as find and replace one string. How can I find 2 specific strings and display the number of occurrences of each find without replacing? Also, how can I find and replace multiple strings at the same time and display the number of occurrences of each replacement?