How important is knowing Regexs?

前端 未结 16 1857
没有蜡笔的小新
没有蜡笔的小新 2021-02-06 05:23

My personal experience is that regexs solve problems that can\'t be efficiently solved any other way, and are so frequently required in a world where strings are as important as

16条回答
  •  自闭症患者
    2021-02-06 06:27

    As a developer you should know the pros and cons of as many tools as possible that could provide pre-made solutions for your problems. Every developer should know how to work with regular expressions and have a feeling when they should be used and when it is besser to use simple string functions to achieve a goal.

    Rejecting them outright because they are hard to read is no option in my opinion. A developer who thinks so strips himself of a valuable tool for searching and validating complex string patterns.

提交回复
热议问题