From fb7ca13856348182b4071135cce82075f9b95e6d Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Tue, 9 Aug 2022 08:56:41 +0200 Subject: Small API change for V4.0: Renamed cregex_find_p() => cregex_find_pt() // pattern Renamed cregex_replace_p() => cregex_replace_pt() // pattern --- examples/regex_replace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/regex_replace.c') diff --git a/examples/regex_replace.c b/examples/regex_replace.c index eba31491..1b140676 100644 --- a/examples/regex_replace.c +++ b/examples/regex_replace.c @@ -22,7 +22,7 @@ int main() printf("INPUT: %s\n", input); /* replace with a fixed string, extended all-in-one call: */ - cstr_take(&str, cregex_replace_p(input, pattern, "YYYY-MM-DD", 0)); + cstr_take(&str, cregex_replace_pt(input, pattern, "YYYY-MM-DD", 0)); printf("fixed: %s\n", cstr_str(&str)); /* US date format, and add 10 years to dates: */ @@ -30,7 +30,7 @@ int main() printf("us+10: %s\n", cstr_str(&str)); /* Wrap first date inside []: */ - cstr_take(&str, cregex_replace_p(input, pattern, "[$0]", 1)); + cstr_take(&str, cregex_replace_pt(input, pattern, "[$0]", 1)); printf("brack: %s\n", cstr_str(&str)); /* Shows how to compile RE separately */ @@ -47,7 +47,7 @@ int main() } /* Wrap all words in ${} */ - cstr_take(&str, cregex_replace_p("[52] apples and [31] mangoes", "[a-z]+", "$${$0}", 0)); + cstr_take(&str, cregex_replace_pt("[52] apples and [31] mangoes", "[a-z]+", "$${$0}", 0)); printf("curly: %s\n", cstr_str(&str)); } } -- cgit v1.2.3