Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
🌇 City life moves fast, with new businesses opening and streets changing daily. Traditional#maps🗺 rely on slow update cycles, so they struggle to keep pace. This outdated information can leave you feeling lost, wasting precious time.
🦖 At#Mappasauruswe utilize the collective power of crowdsourcing by connecting#camerasintegrated with#AI, constantly feeding the latest information on new businesses, road closures, and anything else that changes in the city. With eyes of the#networkeverywhere, you'll always have access to the most updated information. It's a map built for the people, by the people.
Join us to explore and be part of the community that's redefining the future of maps.
👀Follow us on:
Twitter|Instagram|Medium|Youtube|Linkedin| Facebook| Threads| Mastodon
Super Bowl Ad TRICKING You Into Welcoming Surveillance State!
During the Super Bowl, you may have seen a commercial for #Amazon’s #Ring “Search Party” feature, which uses an emotional lost-dog story to encourage adoption of participation in what amounts to a widespread neighborhood #surveillance net. Jimmy points out that the ad masks #privacy risks tied to AI-driven #cameras, data sharing, and Amazon’s broader surveillance ecosystem, including concerns about opt-out defaults and government access.
He and Americans’ Comedian Kurt Metzger expand the discussion into a broader critique of social media and smart devices as tools of self-surveillance, suggesting public safety and convenience are being used to justify constant monitoring. Ultimately, it frames the commercial as emblematic of a growing surveillance state presented as benevolent technology.
https://www.youtube.com/watch?v=5AJtRDjoXN4
#why
Hohem Raises $13.76M
Hohem secures $13.76 million funding in a round closing on December 12, 2024. The brand specializes in AI tracking gimbals for both consumers and professionals, offering stabilizers for smartphones and cameras.
Learn more here
#Funding#Gimbals#AI#Video#Smartphone#Camera#Stabilizers#Tech#Innovation#Cameras#ConsumerElectronics#ProfessionalGear