5 ms·
I think of regexes like I think of code modules that hide abstractions: they should be described via documentation, interfaces, and tests. You generally should
by munchbunny 8y ago
I think of regexes like I think of code modules that hide abstractions: they should be described via documentation, interfaces, and tests. You generally should not need to read/parse the regex to understand what it does.
I think regular expressions are very useful, but trying to push too much parsing work into them is how you end up with unreadable code.
- philwelch 8y agoLuckily, regexes are extremely easy to unit test.