summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/regularexpressions/regex_match.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples/regularexpressions/regex_match.c')
-rw-r--r--misc/examples/regularexpressions/regex_match.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/examples/regularexpressions/regex_match.c b/misc/examples/regularexpressions/regex_match.c
index 6eaea781..11426d2d 100644
--- a/misc/examples/regularexpressions/regex_match.c
+++ b/misc/examples/regularexpressions/regex_match.c
@@ -1,7 +1,7 @@
#define i_import
#include <stc/cregex.h>
#define i_implement
-#include <stc/csubstr.h>
+#include <stc/csview.h>
#define i_key float
#include <stc/cstack.h>
@@ -28,7 +28,7 @@ int main(void)
printf(" %g\n", (double)*i.ref);
// extracts the numbers only to a comma separated string.
- cstr nums = cregex_replace_ss(&re, csubstr_from(str), " $0,", 0, NULL, CREG_STRIP);
+ cstr nums = cregex_replace_sv(&re, csview_from(str), " $0,", 0, NULL, CREG_STRIP);
printf("\n%s\n", cstr_str(&nums));
cstr_drop(&nums);