Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
News: #Tulu Kappi gold mine officially launched in West #Wollega Zone
The gold development project at Tulu Kappi, located in Ganji district of West Wollega, has officially begun operations. On 18 February 2026, Prime Minister Abiy Ahmed, alongside Oromia Regional President Shimallis Abdisa, government officials, and project leaders, inaugurated the construction and development work of the site.
The project site lies 28 km east of Ayra town and covers approximately eight square kilometers. The project is led by KEFI Minerals, which acquired the site in 2014 from Nyota Minerals, previously engaged in exploration activities.
Prior to the official launch, KEFI held consultations with local communities and government officials to agree on resettlement plans and work arrangements.
https://addisstandard.com/?p=55257
Enat Party Alleges Government Forces Massacring Civilians In East Wollega. Read more. https://borkena.com/2025/12/12/enat-party-alleges-government-forces-massacring-civilians-in-east-wollega/#Ethiopia#humanrights#wollega#EnatParty
Reported Drone Strike in Wollega, Oromia region of Ethiopia. Read more.
https://borkena.com/2026/04/17/ethiopia-reported-drone-strike-in-wollega-oromia-region/#Ethiopia#News#Wollega#Dronestrike#humanrights
#GPE_EarlyWarning
April 24, 2026
Urgent Information: #Wollega‼️
Specific areas: #EastWollega Zone, #AngerGutin town
It has been five days since five district (woreda) leaders from areas in the East Wollega Zone with significant Amhara populations began a closed-door meeting in Anger Gutin town, alongside high-ranking officials from the regional level.
Our sources have confirmed that an agreement has been reached to launch a large-scale attack against the Amhara people. Therefore, we urge the entire population to take all necessary precautions and preparations.
___________________
For more updates follow us on:
➡️ Facebook: https://facebook.com/gpethiopia
➡️ X: https://X.com/gpethiopia
➡️ Instagram: https://instagram.com/gpethiopia
➡️ TikTok: https://www.tiktok.com/@gpethiopia
➡️ Telegram: https://t.me/gpe_central
➡️ WhatsAPP: https://whatsapp.com/channel/0029VaAazxGBFLgaX9umXK2M
➡️ Medium: https://gpethiopia.medium.com/