|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| ParallelRegex ($case) | |
| addPattern ($pattern, $label=true) | |
| match ($subject, &$match) | |
| _getCompoundedRegex () | |
| _getPerlMatchingFlags () | |
| ParallelRegex ($case) | |
| addPattern ($pattern, $label=true) | |
| match ($subject, &$match) | |
| _getCompoundedRegex () | |
| _getPerlMatchingFlags () | |
Data Fields | |
| $_patterns | |
| $_labels | |
| $_regex | |
| $_case | |
Compounds the patterns into a single regular expression separated with the "or" operator. Caches the regex. Will automatically escape (, ) and / tokens.
| array | $patterns | List of patterns in order. private |
Definition at line 96 of file parser.php.

Accessor for perl regex mode flags to use.
Definition at line 114 of file parser.php.
| addPattern | ( | $ | pattern, |
| $ | label = true |
||
| ) |
Adds a pattern with an optional label.
| string | $pattern | Perl style regex, but ( and ) lose the usual meaning. |
| string | $label | Label of regex to be returned on a match. public |
Definition at line 55 of file parser.php.
| addPattern | ( | $ | pattern, |
| $ | label = true |
||
| ) |
| match | ( | $ | subject, |
| &$ | match | ||
| ) |
Attempts to match all patterns at once against a string.
| string | $subject | String to match against. |
| string | $match | First matched portion of subject. |
Definition at line 71 of file parser.php.

| match | ( | $ | subject, |
| &$ | match | ||
| ) |
| ParallelRegex | ( | $ | case | ) |
Constructor. Starts with no patterns.
| boolean | $case | True for case sensitive, false for insensitive. public |
Definition at line 40 of file parser.php.
| ParallelRegex | ( | $ | case | ) |