note 24218 modified in function.preg-match by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Fri, 09 Aug 2002 21:45:45 +0000 |
| Subject: | note 24218 modified in function.preg-match by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34639@lists.php.net to get a copy of this message | ||
[Editor's note: For those in Unix/Linux environments, you can also use the egrep command line
program, the GNU version supports extended regexes, but not PCRE.]
Here is a very handy command line utility called pmatch. It is meant to be an alternative to grep.
Most of the functionality is similar, but this has the power of PCRE, and by default it shows only
the portion of the line that matched, not the entire line.
usage: pmatch [ -cfghilnv ] '/pattern/' [ file ] ...
-c : show only line count for each file
-f : show only filenames in output
-g : greedy matching
-h : supress filenames from output
-i : ignore case
-l : show entire line instead of just what matched
-n : show line numbers in output
-s : supress error messages about missing or unreadable files
-t : do not trim whitespace from begin/end of lines
-v : show lines that do NOT match pattern
http://www.phpinsider.com/php/code/pmatch/pmatch
--was--
[Editor's note: For those in Unix/Linux environments, you can also use the egrep command line
program, the GNU version supports extender regexes, but not PCRE.]
Here is a very handy command line utility called pmatch. It is meant to be an alternative to grep.
Most of the functionality is similar, but this has the power of PCRE, and by default it shows only
the portion of the line that matched, not the entire line.
usage: pmatch [ -cfghilnv ] '/pattern/' [ file ] ...
-c : show only line count for each file
-f : show only filenames in output
-g : greedy matching
-h : supress filenames from output
-i : ignore case
-l : show entire line instead of just what matched
-n : show line numbers in output
-s : supress error messages about missing or unreadable files
-t : do not trim whitespace from begin/end of lines
-v : show lines that do NOT match pattern
http://www.phpinsider.com/php/code/pmatch/pmatch
http://www.php.net/manual/en/function.preg-match.php