Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
🌟 Applications for YPIP 2026 are NOW OPEN! 🌟
Are you ready to launch your professional journey next summer?
The Young Professional Internships Program (YPIP) provides university students from Uzbekistan the opportunity to strengthen their professional skills through summer internships with leading companies, NGOs, and organizations in Tashkent.
✅ Participants will:
- Gain hands-on work experience in business, STEM, and other fields
- Take part in professional development workshops and field trips
- Network with peers, mentors, and industry leaders
- Receive guidance from established professionals
🌠 Eligibility:
- Commitment to a career in business or STEM
- Citizens of Uzbekistan, currently residing in the country
- Enrolled at a local university as a 3rd or 4th-year student, or graduating by May 2026
- Proficiency in English
⏰ Application Deadline: December 8, 2025
🔗Link to the application
Young Professional Internships Program (YPIP) is funded by the U.S. Embassy in Tashkent and implemented by American Councils for International Education.
#YPIP2026#Internships#YouthOpportunities
🎓Applications for YPIP 2026 are NOW OPEN!
Are you ready to launch your professional journey next summer?
The Young Professional Internships Program (YPIP) provides university students from Uzbekistan the opportunity to strengthen their professional skills through summer internships with leading companies, NGOs, and organizations in Tashkent.
🟣Participants will:
- Gain hands-on work experience in business, STEM, and other fields
- Take part in professional development workshops and field trips
- Network with peers, mentors, and industry leaders
- Receive guidance from established professionals
✔️Eligibility:
- Commitment to a career in business or STEM
- Citizens of Uzbekistan, currently residing in the country
- Enrolled at a local university as a 3rd or 4th-year student, or graduating by May 2026
- Proficiency in English
⏰ Application Deadline: December 8, 2025
📌Link to the application
Young Professional Internships Program (YPIP) is funded by the U.S. Embassy in Tashkent and implemented by American Councils for International Education.
#YPIP2026#Internships#YouthOpportunities