Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
🔖McHenry urges Senate to pass FIT21 crypto bill before election
The United States House’s widely positive vote on the crypto-regulating FIT21 bill should be “a wake-up call” to the Senate to quickly pass it, says Rep. Patrick McHenry 💬
#Cryptotrader
#Cryptotwitter
#Cryptoinvestment
#Cryptocurrencyexchange
Crypto Highlights: Recent Developments
📈 K33 analysts have predicted the peak date of the bull run.
⚖️ Craig Wright received a conditional sentence for contempt of court.
💵 VC investors are leaving crypto, while crypto distances itself from VC investors.
📊 A Bitcoin crash at $100,000 led to over $1 billion in liquidations.
🐋 El Salvador expanded its Bitcoin purchases despite an IMF deal.
💬 Tornado Cash co-founder demands charges be dropped.
👾 Ilya Lichtenstein claims sole responsibility for the Bitfinex hack.
💰 Cryptopia clients received $225 million in assets from liquidators.
✅ SEC approved the first hybrid ETFs based on Bitcoin and Ethereum.
👁 German regulator ordered World to delete user data.
👀 Investors sued the team behind the HAWK token.
⚽️ An American football player will receive part of his salary in Bitcoin.
🚀 Cathy Wood confirmed her Bitcoin price prediction exceeds $1 million.
🤑 Colin Wu shared the success story of a 24-year-old crypto trader.
#K33#CraigWright#VC#Bitcoin#Liquidation#ElSalvador#TornadoCash#Bitfinex#Cryptopia#SEC#ETFs#Germany#HAWK#Football#CathyWood#CryptoTrader#CryptoNews#Investments#MarketTrends#CryptoRegulation#Blockchain