Class Match
A successful regular expression match.
-
Parco\Result
implements
Parco\Positional
uses
Parco\Position
-
Parco\Success
-
Parco\Match
Methods summary
public
|
#
__construct( array $matches, array $pos, array $nextInput, array $nextPos )
Construct regular expression result.
Construct regular expression result.
Parameters
- $matches
- Matches as returned by preg_matches.
- $pos
- Result position.
- $nextInput
- Remaining input.
- $nextPos
- Next position.
Overrides
|
public
string|null
|
#
group( integer $i )
Get the matched string in group $i.
Get the matched string in group $i.
Parameters
- $i
Group number. 0 is the string that matched the full
pattern, i.e. get() = group(0) .
Returns
string|null The matched string or null if empty group.
|
public
integer|null
|
#
offset( integer $i )
Get the index of the first matched character in group $i.
Get the index of the first matched character in group $i.
Parameters
- $i
Group number. 0 is the string that matched the full
pattern.
Returns
integer|null The matched offset or null if empty group.
|