[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/vendor/pake/ -> pakeGlobToRegex.class.php (sommaire)

(pas de description)

Author: Fabien Potencier <fabien.potencier@symfony-project.com> php port
Author: Richard Clamp <richardc@unixbeard.net> perl version
Copyright: 2004-2005 Fabien Potencier <fabien.potencier@symfony-project.com>
Copyright: 2002 Richard Clamp <richardc@unixbeard.net>
License: see the LICENSE file included in the distribution
Version: SVN: $Id: pakeGlobToRegex.class.php 1791 2006-08-23 21:17:06Z fabien $
Poids: 139 lignes (4 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

pakeGlobToRegex:: (3 méthodes):
  setStrictLeadingDot()
  setStrictWildcardSlash()
  glob_to_regex()


Classe: pakeGlobToRegex  - X-Ref

Match globbing patterns against text.

if match_glob("foo.*", "foo.bar") echo "matched\n";

// prints foo.bar and foo.baz
$regex = glob_to_regex("foo.*");
for (array('foo.bar', 'foo.baz', 'foo', 'bar') as $t)
{
if (/$regex/) echo "matched: $car\n";
}

pakeGlobToRegex implements glob(3) style matching that can be used to match
against text, rather than fetching names from a filesystem.

based on perl Text::Glob module.

setStrictLeadingDot($boolean)   X-Ref
Pas de description

setStrictWildcardSlash($boolean)   X-Ref
Pas de description

glob_to_regex($glob)   X-Ref
Returns a compiled regex which is the equiavlent of the globbing pattern.

param: string glob pattern
return: string regex



Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7