Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
Cloud Range Raises $6.19M
Cloud Range secures $6.19M in funding to enhance its Cyber Range as a Service, enabling teams to effectively train for quicker detection and response to cyber attacks.
#CyberSecurity#Funding#CyberRange#TechInvestment#CloudServices
🚀 AI TRENDS | Rising Token Consumption and Agent Frameworks Drive Cloud Service Growth
At the 17th plenary session of the China Artificial Intelligence Industry Development Alliance, Yu Xiaohui emphasized the increasing consumption of tokens and the rapid advancement of agent frameworks, such as OpenClaw. According to NS3.AI, Yu noted that the broader adoption of these agents is contributing to the growth of cloud services. However, he also highlighted the need for parallel security governance to address risks related to data privacy and permission abuse.
#AI#ArtificialIntelligence#TokenConsumption#AgentFrameworks#CloudServices#DataPrivacy#SecurityGovernance#OpenClaw