3 ms·
RegExp is optimized for typing, not for reading. Trouble comes when one need to update or debug a complex RegExp. The one you posted is not that complex.
by pygy_ 4y ago
RegExp is optimized for typing, not for reading.
Trouble comes when one need to update or debug a complex RegExp. The one you posted is not that complex.
- ttfkam 4y agoBut isn't that true of most programs once they reach a certain level of complexity? Especially after they've been optimized? Eventually one relies on tests to ensure your changes don't introduce bugs and unwanted side effects. Sadly, most folks don't bother to write tests for their regexes.