5 ms·
Regular expressions? I really enjoy using them and futzing around but I encourage the people I work with to stay away and to avoid using in production when poss
by codyb 6y ago
Regular expressions? I really enjoy using them and futzing around but I encourage the people I work with to stay away and to avoid using in production when possible.
- turminal 6y agoRegular expressions are useful as tools for searching through code, filtering logs, searching through the filesystem..., even if you never commit them into your codebase.
- breck 6y agoYes, good clarification. I probably write 10x (maybe 100x? more?) more throwaway regexes than regexes I commit.
- trulyme 6y agoWhoa, why? That sounds like an awful advice to me. By all means, use regexes, but make sure you understand the theory behind them (state machines) so you will know not to parse HTML with them. They are really pretty easy to do right once you grasp the concepts.
- breck 6y agoYou can write correct ad hoc regex parsers for many subsets of HTML depending upon your needs.