From c7c2e03ea21f725f2e950cfe3cf41e94f8e703db Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sat, 3 Jan 2026 07:18:50 -0300 Subject: [PATCH] fix(nextcloud-mail-sync): mawk-compatible email regex --- scripts/nextcloud-mail-sync.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/nextcloud-mail-sync.sh b/scripts/nextcloud-mail-sync.sh index 1d64685..2efe58a 100755 --- a/scripts/nextcloud-mail-sync.sh +++ b/scripts/nextcloud-mail-sync.sh @@ -33,7 +33,8 @@ list_mail_accounts() { next; } id != "" && /@/ { - if (match($0, /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/)) { + # Keep the regex simple (mawk doesn't support interval expressions like {2,}). + if (match($0, /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+/)) { printf("%s\t%s\n", id, substr($0, RSTART, RLENGTH)); id=""; }