3 ms·
Regex in Retrograde
- NoZebra120vClip 3y agoYeah, so this blogger is selling enterprise-level Cybersecurity solutions, and I can see where you can't have simple regexps in charge of your old "signature-based IDS/IPS" type systems. And she brings up some definitely pathological regexps, like those trying to parse email addresses! Or URLs! But the spaces where I've had good fortune with regexps is different. It's when I'm parsing a log file, or something akin to a CSV, where it has a somewhat known formatting, and I'm trying to tease out certain fields, or, well, patterns from those. Also in Vim, where I can run an ad hoc regexp over arbitrary text, to do a simple search-and-replace, or massage stuff so it's formatted how I want. Regexps were never intended to parse stuff. Back in the day, we had Lex and YACC. I never touched any of that. You get used to regexps, and you cry when you use a search engine that lacks them. (Her jwz link is already 404 for me. Or is jwz playing with Referer again?)