note 24218 modified in function.preg-match by jmcastagnetto

From: Date: Fri, 09 Aug 2002 21:42:46 +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-34635@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 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 --was-- 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

« previous php.notes (#34635) next »