Why are regular expressions called “regular” expressions?

前端 未结 5 1674
孤城傲影
孤城傲影 2020-12-29 18:29

Why are regular expressions called regular expressions?

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-29 18:31

    Why are they called "regular expressions?"

    Regular expressions trace back to the work of an American mathematician by the name of Stephen Kleene (one of the most influential figures in the development of theoretical computer science) who developed regular expressions as a notation for describing what he called "the algebra of regular sets." His work eventually found its way into some early efforts with computational search algorithms, and from there to some of the earliest text-manipulation tools on the Unix platform (including ed and grep). In the context of computer searches, the "*" is formally known as a "Kleene star."

    From here.

提交回复
热议问题