Live data from Hacker News

Is it a must for every programmer to learn regular expressions?

programmers.stackexchange.com

1–10 of 60 posts

Re: Is it a must for every programmer to learn regular expressions?

#5
I was thinking about this question and it occurred to me. The programmers who probably don't need to know regexes[1] almost certainly already learned them. So I guess that's a yes.

[1] Thinking of embedded systems developers creating code for, say, automotive entertainment systems, or control code for scientific or medical hardware.

Re: Is it a must for every programmer to learn regular expressions?

#6

Only if you're doing a lot of string parsing. Just like learning about algorithms on graphs is a must only if you're working with graphs of a non-trivial size.

I don't agree. Regular expressions come in handy as well during your day to day work: you can save a lot of time if you know how to use them in your editor "search & replace" function, or just when a simple search in a directory gives you too many results and you need to switch to power tools (read: egrep).

Re: Is it a must for every programmer to learn regular expressions?

#8

I was thinking about this question and it occurred to me. The programmers who probably don't need to know regexes[1] almost certainly already learned them. So I guess that's a yes. [1] Thinking of embedded systems developers creating code for, say, automotive entertainment systems, or control code for scientific or medical hardware.

[1] Thinking of embedded systems developers creating code for, say, automotive entertainment systems, or control code for scientific or medical hardware.

Don't they have log files to read?

Re: Is it a must for every programmer to learn regular expressions?

#9
I really liked eykanal's answer [1].

    > Regular expressions are a tool. It happens to be a
    > very useful tool, so many people choose to learn how
    > to use it. However, there's no "requirement" for 
    > you to learn how to use this particular tool, any
    > more than there is a "requirement" for you to learn
    > anything else.
Nails it. I do think most programmers will eventually run across a problem to which the solution is 'Use Regex', but it's not an absolute "must" like boolean logic.

[1] http://programmers.stackexchange.com/questions/133968/is-it-...

Post reply on HN