Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
🚀 Morgan Stanley's Bitcoin Trust Launches with Strong Inflows on NYSE Arca
Morgan Stanley's Bitcoin Trust (MSBT) made its debut on the NYSE Arca on Wednesday, attracting $30.6 million in first-day inflows and generating approximately $34 million in trading volume. According to NS3.AI, as of April 8, MSBT held 444.4 Bitcoin, valued at around $31.7 million, and offered the lowest fee among U.S. spot Bitcoin ETF competitors. This marks the first spot Bitcoin ETF launched by a U.S. bank. On the same day, BlackRock's IBIT led with $40 million in inflows. Data from Farside indicates that total net outflows across U.S. spot Bitcoin ETFs amounted to $124.5 million on Wednesday.
#Bitcoin#ETF#MorganStanley#NYSEArca#Cryptocurrency#Finance#Investment#BlackRock#CryptoMarket#SpotBitcoin#BTC
🚀 Bitwise Amends Spot Hyperliquid ETF Proposal with SEC
Bitwise Asset Management has submitted a second amendment for its proposed spot Hyperliquid ETF to the U.S. Securities and Exchange Commission as of April 10. According to NS3.AI, the amendment outlines a 0.67% annual management fee and introduces Flowdesk and Wintermute as approved HYPE trading counterparties, while removing A1 from the list. Anchorage Digital Bank remains the custodian for the fund. The ETF is set to trade on NYSE Arca under the ticker BHYP, with plans to stake the majority of its HYPE holdings while maintaining a 30% liquidity reserve for redemptions.
#Bitwise#AssetManagement#HyperliquidETF#SEC#Amendment#ManagementFee#Flowdesk#Wintermute#A1#AnchorageDigitalBank#NYSEArca#BHYP#HYPE#LiquidityReserve#Redemptions