mirror of
https://github.com/dlang/phobos.git
synced 2025-05-07 19:49:36 +03:00
Merge pull request #1568 from blackwhale/fix-regex-doc
Put a proper description for std.regex.matchAll
This commit is contained in:
commit
f85fac2a11
1 changed files with 9 additions and 6 deletions
15
std/regex.d
15
std/regex.d
|
@ -5908,7 +5908,7 @@ public auto match(R, RegEx)(R input, RegEx re)
|
||||||
)
|
)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
$(LREF Captures) containing matching together with all submatches
|
$(LREF Captures) containing the extent of a match together with all submatches
|
||||||
if there was a match, otherwise an empty $(LREF Captures) object.
|
if there was a match, otherwise an empty $(LREF Captures) object.
|
||||||
+/
|
+/
|
||||||
public auto matchFirst(R, RegEx)(R input, RegEx re)
|
public auto matchFirst(R, RegEx)(R input, RegEx re)
|
||||||
|
@ -5931,9 +5931,12 @@ public auto matchFirst(R, RegEx)(R input, RegEx re)
|
||||||
}
|
}
|
||||||
|
|
||||||
/++
|
/++
|
||||||
Find the first (leftmost) slice of the $(D input) that
|
Initiate a search for all non-overlapping matches to the pattern $(D re)
|
||||||
matches the pattern $(D re). This function picks the most suitable
|
in the given $(D input). The result is a lazy range of matches generated
|
||||||
regular expression engine depending on the pattern properties.
|
as they are encountered in the input going left to right.
|
||||||
|
|
||||||
|
This function picks the most suitable regular expression engine
|
||||||
|
depending on the pattern properties.
|
||||||
|
|
||||||
$(D re) parameter can be one of three types:
|
$(D re) parameter can be one of three types:
|
||||||
$(UL
|
$(UL
|
||||||
|
@ -5945,8 +5948,8 @@ public auto matchFirst(R, RegEx)(R input, RegEx re)
|
||||||
)
|
)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
$(LREF Captures) containing matching together with all submatches
|
$(LREF RegexMatch) object that represents matcher state
|
||||||
if there was a match, otherwise an empty $(LREF Captures) object.
|
after the first match was found or an empty one if not present.
|
||||||
+/
|
+/
|
||||||
public auto matchAll(R, RegEx)(R input, RegEx re)
|
public auto matchAll(R, RegEx)(R input, RegEx re)
|
||||||
if(isSomeString!R && is(RegEx == Regex!(BasicElementOf!R)))
|
if(isSomeString!R && is(RegEx == Regex!(BasicElementOf!R)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue