News for hackers. Stuff that matters.
Re:Ask HN: What bits of fundamental knowledge are productivi... by rtourn on Wednesday March 30, 2022 @12:10PM (#30857170)
A good text editor will have regex ability, and once you learn it, it’s super convenient to have it handy. Writing macros to do stuff is more of a hassle. RegEx is most useful for me as a super quick and easy way to solve a one off problem that isn’t important enough to write code to solve.

I once walked in on a coworker (who’s not a developer) who had copied a pdf into text and was laboriously scrolling through thousands of lines of text to remove footer text with page numbers. He spent hours doing this, it’s a 10 second problem with using regex.

In the same job, sometimes our clients would give me large files in the wrong format (like a word document) that couldn’t be normally be import. Notepad++ and some regex magic pulled out all the data I cared about in a minute. It would have taken years if my other coworker did it his way.

Re:Ask HN: What bits of fundamental knowledge are productivi... by hermannj314 on Wednesday March 30, 2022 @02:00PM (#30858622)
Thanks for mentioning that use case of a footer with page numbers. I can understand how a RegEx would be powerful there.