From c1a62521c4f4fd4f540b00d55d8ca197b59837cb Mon Sep 17 00:00:00 2001 From: Bruno Raoult Date: Sun, 5 Sep 2021 12:46:41 +0200 Subject: [PATCH] C phone-number: more comments --- c/phone-number/phone_number.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/c/phone-number/phone_number.c b/c/phone-number/phone_number.c index 22c5773..2efe4e6 100644 --- a/c/phone-number/phone_number.c +++ b/c/phone-number/phone_number.c @@ -12,6 +12,10 @@ /* this version is likely not very stable, due to poor scanf() capabilities * I made it to offer an option to traditional strtok() or manual string * parsing. + * Examples: + * (1 (222-333.4444 + * 1)))))) 222))) ...---... 333 ...---... 4444 + * are both valid here, when they surely should not :-) */ static char *scan="%m[+(0-9]%*[()-. ]%m[0-9]%*[)-. ]%m[0-9]%*[-. ]%m[0-9]";