Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
#rust#caldav#carddav#imap#jmap#mail#pop3#rust#server#smtp#webdav
Stalwart is a secure, fast, and scalable open-source mail and collaboration server supporting all major email protocols (IMAP, SMTP, JMAP, POP3) plus calendar, contacts, and file sharing. It offers strong built-in spam and phishing protection, advanced message authentication (DMARC, DKIM, SPF), and flexible storage options. Designed for high availability and fault tolerance, it can scale from small setups to thousands of nodes without complex proxies. Its web-based admin interface and automation tools simplify management. Using Stalwart helps you control your email securely, improve collaboration, and reduce reliance on big tech, making your communication more private and reliable.
https://github.com/stalwartlabs/stalwart
#go#dovecot#email#email_marketing#mail#mailserver#newsletter#newsletters#postfix#rspamd#server#smtp
BillionMail is a free, open-source mail server and email marketing tool that lets you send newsletters, promotions, and transactional emails with full control and privacy. You can install it in about eight minutes, connect your own domain, and start campaigns easily. It offers advanced analytics, unlimited sending, customizable templates, and keeps your data secure on your own server. This means you avoid expensive fees, hidden costs, and third-party tracking, making it ideal for businesses and individuals who want powerful, private, and flexible email marketing[2][3][4].
https://github.com/aaPanel/BillionMail