Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions std/EReg.hx
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ class EReg {
`this.matchSub`, and then operates on the String of that operation.

The index `n` corresponds to the n-th set of parentheses in the pattern
of `this` EReg. If no such sub-group exists, the result is unspecified.
of `this` EReg. If `n` equals 0, the whole matched substring is returned.

If `n` equals 0, the whole matched substring is returned.
If the sub-group `n` was defined in the pattern but did not participate
in the match, `null` is returned.

If no sub-group with index `n` exists in the pattern, the result is
unspecified.
**/
public function matched(n:Int):String {
public function matched(n:Int):Null<String> {
return null;
}

Expand Down