diff options
| author | Tyge Løvset <[email protected]> | 2023-01-26 10:02:06 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-01-26 10:02:06 +0100 |
| commit | 0c7e627aa27ba42b9a9a4472a4f1cdf857c1a833 (patch) | |
| tree | ce3a61931dff4770f49c27aead7b24aeb3360f74 | |
| parent | 0b40c6af56231b4c2109596c88dcfce09c1429f7 (diff) | |
| download | STC-modified-0c7e627aa27ba42b9a9a4472a4f1cdf857c1a833.tar.gz STC-modified-0c7e627aa27ba42b9a9a4472a4f1cdf857c1a833.zip | |
Removed cregex args in examples which are now defaulted.
| -rw-r--r-- | misc/examples/regex1.c | 2 | ||||
| -rw-r--r-- | misc/examples/regex2.c | 2 | ||||
| -rw-r--r-- | misc/examples/regex_match.c | 2 | ||||
| -rw-r--r-- | misc/examples/splitstr.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/regex1.c b/misc/examples/regex1.c index 9552db62..ae00b71c 100644 --- a/misc/examples/regex1.c +++ b/misc/examples/regex1.c @@ -10,7 +10,7 @@ int main(int argc, char* argv[]) c_AUTO (cstr, input) c_AUTO (cregex, float_expr) { - int res = cregex_compile(&float_expr, "^[+-]?[0-9]+((\\.[0-9]*)?|\\.[0-9]+)$", CREG_DEFAULT); + int res = cregex_compile(&float_expr, "^[+-]?[0-9]+((\\.[0-9]*)?|\\.[0-9]+)$"); // Until "q" is given, ask for another number if (res > 0) while (true) { diff --git a/misc/examples/regex2.c b/misc/examples/regex2.c index e24cce51..2b742529 100644 --- a/misc/examples/regex2.c +++ b/misc/examples/regex2.c @@ -18,7 +18,7 @@ int main() c_AUTO (cregex, re) c_FORRANGE (i, c_ARRAYLEN(s)) { - int res = cregex_compile(&re, s[i].pattern, CREG_DEFAULT); + int res = cregex_compile(&re, s[i].pattern); if (res < 0) { printf("error in regex pattern: %d\n", res); continue; diff --git a/misc/examples/regex_match.c b/misc/examples/regex_match.c index b6bd6521..93b83651 100644 --- a/misc/examples/regex_match.c +++ b/misc/examples/regex_match.c @@ -17,7 +17,7 @@ int main() c_AUTO (cstr, nums) { const char* pattern = "[+-]?([0-9]*\\.)?\\d+([Ee][+-]?\\d+)?"; - int res = cregex_compile(&re, pattern, CREG_DEFAULT); + int res = cregex_compile(&re, pattern); printf("%d: %s\n", res, pattern); // extract and convert all numbers in str to floats diff --git a/misc/examples/splitstr.c b/misc/examples/splitstr.c index 70d1935e..ba927412 100644 --- a/misc/examples/splitstr.c +++ b/misc/examples/splitstr.c @@ -13,7 +13,7 @@ int main() puts("\nSplit with c_FORMATCH (regex):"); - c_WITH (cregex re = cregex_from("[^ ]+", CREG_DEFAULT), cregex_drop(&re)) + c_WITH (cregex re = cregex_from("[^ ]+"), cregex_drop(&re)) c_FORMATCH (i, &re, " Hello World C99! ") printf("'%.*s'\n", c_ARGSV(i.match[0])); } |
