Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
🚀 Charles Schwab to Launch Bitcoin and Ethereum Spot Trading by 2026
Charles Schwab Corporation has announced plans to introduce spot trading services for Bitcoin and Ethereum by the first half of 2026. According to ChainCatcher, the company's President and CEO, Rick Wurster, confirmed this development in a letter to shareholders on Monday. The rollout will begin with a limited test in the second quarter before expanding to Schwab's extensive client base.
In related news, CME Group Inc. is set to expand its cryptocurrency derivatives offerings. Following a record daily nominal trading volume of $8 billion in March, the company will launch futures contracts for Avalanche (AVAX) and Sui (SUI) on May 4, including both standard and micro versions.
Meanwhile, Core Scientific, Inc. has outlined plans to liquidate its Bitcoin reserves by 2026. The company's latest regulatory filings indicate a strategy to monetize nearly all of its Bitcoin holdings to boost liquidity and fund capital expenditures. This move marks a shift towards selling off digital assets to acquire hardware necessary for AI transformation.
#CharlesSchwab#Bitcoin#Ethereum#Cryptocurrency#SpotTrading#CMEGroup#Avalanche#Sui#CoreScientific#DigitalAssets#AITransformation#AVAX#BTC#ETH