diff options
| author | Tyge Løvset <[email protected]> | 2022-01-09 23:03:20 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-01-09 23:10:48 +0100 |
| commit | 4925e503aa2234a3ad804256713276199d58dd0d (patch) | |
| tree | 786ff3fa691e35d652b5a80f03024e1837d590f4 /examples | |
| parent | 7838ca9236fa019fc7018f3a6a78972b1872468b (diff) | |
| download | STC-modified-4925e503aa2234a3ad804256713276199d58dd0d.tar.gz STC-modified-4925e503aa2234a3ad804256713276199d58dd0d.zip | |
Probably stable API for cregex.h
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/regex_match.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/regex_match.c b/examples/regex_match.c index 887f4ddf..dca8a127 100644 --- a/examples/regex_match.c +++ b/examples/regex_match.c @@ -17,14 +17,14 @@ int main() {
re = cregex_new("[+-]?([0-9]*\\.)?[0-9]+([Ee][-+]?[0-9]+)?");
cregex_match match;
- if (cregex_find(re, s, &match)) {
+ if (cregex_find(&re, s, &match)) {
printf("Found digits at position %zu-%zu\n", match.start, match.end);
} else {
printf("Could not find any digits\n");
}
csview sv = {s, 0};
- while (cregex_find_next_v(re, s, &sv)) {
+ while (cregex_find_next_v(&re, s, &sv)) {
printf(c_PRIsv " ; ", c_ARGsv(sv));
}
puts("");
|
