3 ms·
You do realize what you did in Ruby that took you a couple of hours to learn could have been done with grep in one line?
by dlp211 12y ago
You do realize what you did in Ruby that took you a couple of hours to learn could have been done with grep in one line?
- enraged_camel 12y agoI do, yes. I was using Windows at the time, unfortunately. So I wasn't aware of a tool like Grep (or that it was available for Windows as a downloadable tool). Besides, I was looking for an excuse to learn a bit of programming, some sort of practical, small-scale project, so it worked out. ;)
- gwern 12y agoI really doubt that he spent a few hours fiddling with regexps. 'Those darn @ signs! Just how do I match them?!' I suspect the few hours had to do more with the part he mentions about extracting the embedded text from a PDF. (I've seen a lot of PDFs where a standard tool like pdf2text spits out garbage.)