util/regexp/RegexpEngine.php
Contains some shared attributes and methods -- and some abstract methods with engine-specific implementations that sub-classes must override.
- Author
- Hans Lellelid
- Package
- phing.util.regexp
- Version
- $Id$
\RegexpEngine
Package: phing\util\regexp
Contains some shared attributes and methods -- and some abstract methods with engine-specific implementations that sub-classes must override.
- Children
- \PregEngine
- Author
- Hans Lellelid
- Version
- $Id$
Methods

match(
string $pattern, string $source, array $matches
)
:
booleanMatches pattern against source string and sets the matches array.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $pattern | string | The regex pattern to match. |
| $source | string | The source string. |
| $matches | array | The array in which to store matches. |
| Type | Description |
|---|---|
| boolean | Success of matching operation. |

matchAll(
string $pattern, string $source, array $matches
)
:
booleanMatches all patterns in source string and sets the matches array.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $pattern | string | The regex pattern to match. |
| $source | string | The source string. |
| $matches | array | The array in which to store matches. |
| Type | Description |
|---|---|
| boolean | Success of matching operation. |

replace(
string $pattern, string $replace, string $source
)
:
stringReplaces $pattern with $replace in $source string.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $pattern | string | The regex pattern to match. |
| $replace | string | The string with which to replace matches. |
| $source | string | The source string. |
| Type | Description |
|---|---|
| string | The replaced source string. |