News for hackers. Stuff that matters.
Re:Python, Catastrophic Regular Expressions and the GIL (2013) by Joker_vD on Monday November 14, 2022 @08:04AM (#33593348)
Ah, the /"([^"]*)"/ trick. It was one of those small, obvious in retrospect but not that easy to invent on your own, useful things I was taught at my first job among others such as "if in a unit test you need a future date, use year 3001".
Re:Python, Catastrophic Regular Expressions and the GIL (2013) by matsemann on Monday November 14, 2022 @08:18AM (#33593507)
Yeah, in my toy example here I could probably go with a non-greedy modifier like .*?, but sometimes one needs to bring out these weird tricks, heh.