3 ms·
I suggest the book Mastering Regular Expressions by Mark Friedl, published by O'Reilly. PDF here: https://github.com/pengbo-learn/books/blob/master/Mastering%2
by gregjor 2y ago
I suggest the book Mastering Regular Expressions by Mark Friedl, published by O'Reilly. PDF here:
https://github.com/pengbo-learn/books/blob/master/Mastering%20Regular%20Expressions%203rd%20(Friedl-2006).pdf https://github.com/pengbo-learn/books/blob/master/Mastering%...
Using regexes to parse structured data -- HTML, XML, JSON, CSV, etc. -- usually a bad idea. Use an XML or HTML parser, JSON decoder, CSV interpreter. Dealing with the quotes and escaped characters too fragile with regular expressions.
- noduerme 2y agoRegex is useful only for simple validation or lazy stripping of tags. And expect edge cases. If you are in charge of the input, it's very useful to find what you're looking for. Otherwise, good luck. Also, the post you're responding to seems like a bot.
- cannibalXxx 2y agothere are no bots here, i am flesh and blood and this post was taken from https://chat-to.dev/post?id=798 https://chat-to.dev/post?id=798
- ThrowawayR2 2y agoThey're not a bot but they are definitely spamming / SEOing in violation of the HN guidelines. Look at their recent posting history (https://news.ycombinator.com/threads?id=cannibalXxx https://news.ycombinator.com/threads?id=cannibalXxx) which all mention their own site (https://news.ycombinator.com/user?id=cannibalXxx https://news.ycombinator.com/user?id=cannibalXxx in the About field) which has already been banned for spamming (https://news.ycombinator.com/from?site=chat-to.dev https://news.ycombinator.com/from?site=chat-to.dev and turn on showdead). They already know they're violating HN guidelines (https://news.ycombinator.com/item?id=41979929 https://news.ycombinator.com/item?id=41979929) so if you send an email to moderators, they'll hopefully take care of it.