summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/regex2.c
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-04-12 15:55:33 -0400
committerrealtradam <[email protected]>2023-04-12 15:55:33 -0400
commit0841165881871ee01b782129be681209aeed2423 (patch)
tree8a76b61dcaab381b6b42305201ae8b6259f6b6c0 /misc/examples/regex2.c
parent554f3e8acf7855b5d6a90cc68cefb7445460b03c (diff)
parent0516aa3ae823ed9a22b2c5f776948c8447c32c31 (diff)
downloadSTC-modified-0841165881871ee01b782129be681209aeed2423.tar.gz
STC-modified-0841165881871ee01b782129be681209aeed2423.zip
Merge branch 'master' into modified
Diffstat (limited to 'misc/examples/regex2.c')
-rw-r--r--misc/examples/regex2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/misc/examples/regex2.c b/misc/examples/regex2.c
index 20bd323c..3133f7c2 100644
--- a/misc/examples/regex2.c
+++ b/misc/examples/regex2.c
@@ -15,8 +15,8 @@ int main()
{"\\p{Han}+", "This is Han: 王明:那是杂志吗?"},
};
- c_auto (cregex, re)
- c_forrange (i, c_ARRAYLEN(s))
+ cregex re = {0};
+ c_forrange (i, c_arraylen(s))
{
int res = cregex_compile(&re, s[i].pattern);
if (res < 0) {
@@ -30,4 +30,5 @@ int main()
printf(" submatch %lld: %.*s\n", k, c_SV(j.match[k]));
}
}
+ cregex_drop(&re);
}