Introduction

Introduction -- HowTo s'n'r in files

Using

With SearchReplace, you can replace a text in as many as desired files by another.

The example replaces all occurences of "Yes" with "No" in the given $files and in all files in the directory "/mail/". If a line in a file starts with one of the chars in $ignoreline, possible matches will be ignored.

You can do a new search without creating a new instance of the class.

Types of search functions

File_SearchReplace supports different kinds of search functions. The type directly influence the format of the required $find-parameter

normal - default, the only type supporting the $IgnoreLines-parameter
quick - use str_replace()
preg - use preg_replace()
ereg - use ereg_replace()

To set the type, call setSearchFunction() before doSearch().


HIVE: All information for read only. Please respect copyright!
Hosted by hive ÊÃÁ: Êèåâñêàÿ ãîðîäñêàÿ áèáëèîòåêà