cleanup, docs
This commit is contained in:
@@ -9,6 +9,7 @@ flags : optional regex flags
|
||||
return value : a DValue containing all non-overlapping matches
|
||||
|
||||
:see
|
||||
>string
|
||||
>regex
|
||||
regex_match
|
||||
regex_search
|
||||
@@ -21,13 +22,6 @@ Finds every non-overlapping match of `pattern` in `subject`.
|
||||
|
||||
Example:
|
||||
|
||||
```uce
|
||||
DValue tags = regex_search_all("#(?<tag>[A-Za-z0-9_]+)", "Ship #uce and #docs");
|
||||
|
||||
tags["matches"].each([](DValue match, String key) {
|
||||
print(match["named"]["tag"].to_string(), "\n");
|
||||
});
|
||||
```
|
||||
|
||||
Return shape:
|
||||
|
||||
@@ -37,3 +31,7 @@ Return shape:
|
||||
- `pattern` and `flags` mirror the call inputs.
|
||||
|
||||
Zero-length matches are handled safely; the scanner advances after each zero-length match to avoid infinite loops.
|
||||
|
||||
:example
|
||||
DValue matches = regex_search_all("[a-z]+", "uce docs");
|
||||
print(matches.is_list() ? "matches\n" : "none\n");
|
||||
|
||||
Reference in New Issue
Block a user