Are regular expressions worth the hassle?

后端 未结 24 1506
说谎
说谎 2020-12-03 13:58

It strikes me that regular expressions are not understood well by the majority of developers. It also strikes me that for a lot of problems where regular expressions are use

24条回答
  •  余生分开走
    2020-12-03 14:24

    Maintaining one regular expression is a lot less effort than maintaining 20 lines of code. And you underestimate the amount of code needed - for a regex of any complexity, the replacement code could easily be 200 rather than 20 lines.

提交回复
热议问题