cleanup, docs

This commit is contained in:
root
2026-06-16 12:21:31 +00:00
parent dff1959341
commit ea08d5f28b
296 changed files with 1571 additions and 1940 deletions
+5 -20
View File
@@ -9,6 +9,7 @@ flags : optional regex flags
return value : a DValue describing the first match
:see
>string
>regex
regex_match
regex_search_all
@@ -21,19 +22,6 @@ Searches `subject` for the first occurrence of `pattern` and returns structured
Example:
```uce
DValue match = regex_search(
"(?<user>[A-Za-z0-9._%+-]+)@(?<host>[A-Za-z0-9.-]+)",
"Contact ops@example.test"
);
if(match["matched"].to_bool())
{
print(match["match"].to_string());
print(match["named"]["user"].to_string());
print(match["named"]["host"].to_string());
}
```
Return shape:
@@ -48,12 +36,9 @@ Return shape:
Capture entries contain:
```text
capture["index"]
capture["matched"]
capture["start"]
capture["end"]
capture["text"]
```
If no match is found, `matched` is `false` and match-specific fields are omitted.
:example
DValue match = regex_search("docs", "uce docs");
print(match["match"].to_string(), "\n");