3 ms·
Regular expression are a good one that you can learn pretty quickly. I think it follows that classic 80/20 rule, and that 80 percent can be an hour up front and
by jjice 7y ago
Regular expression are a good one that you can learn pretty quickly. I think it follows that classic 80/20 rule, and that 80 percent can be an hour up front and then regular practice for a week or two in regular workloads. You can go extremely in depth, but to be effective, you don't need to. Learn how they work and the syntax for the most common 'flavors'(PCRE, egrep, etc).
Try to incorporate them in places where you would normally use plain text searching, or just practice on your current code base and see how you could capture the name of all functions that return `int`.
Regular expressions are not always the answer. If you don't need them, usually they're going to be slow, but they can be a quick hack in a script, an effective way to validate input, or a fast way to find/replace in your text editor.