diff options
Diffstat (limited to 'misc/examples/regex_replace.c')
| -rw-r--r-- | misc/examples/regex_replace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/regex_replace.c b/misc/examples/regex_replace.c index ec38ca56..ebb57488 100644 --- a/misc/examples/regex_replace.c +++ b/misc/examples/regex_replace.c @@ -17,7 +17,7 @@ int main() const char* pattern = "\\b(\\d\\d\\d\\d)-(1[0-2]|0[1-9])-(3[01]|[12][0-9]|0[1-9])\\b"; const char* input = "start date: 2015-12-31, end date: 2022-02-28"; - c_AUTO (cstr, str) + c_auto (cstr, str) { printf("INPUT: %s\n", input); @@ -34,9 +34,9 @@ int main() printf("brack: %s\n", cstr_str(&str)); /* Shows how to compile RE separately */ - c_WITH (cregex re = cregex_from(pattern), cregex_drop(&re)) { + c_with (cregex re = cregex_from(pattern), cregex_drop(&re)) { if (cregex_captures(&re) == 0) - continue; /* break c_WITH */ + continue; /* break c_with */ /* European date format. */ cstr_take(&str, cregex_replace(&re, input, "$3.$2.$1")); printf("euros: %s\n", cstr_str(&str)); |
