Hacker News new | ask | show | jobs
by rtourn 1541 days ago
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.

1 comments

Thanks for mentioning that use case of a footer with page numbers. I can understand how a RegEx would be powerful there.