Writing a parser for regular expressions

前端 未结 5 939
青春惊慌失措
青春惊慌失措 2021-01-29 18:22

Even after years of programming, I\'m ashamed to say that I\'ve never really fully grasped regular expressions. In general, when a problem calls for a regex, I can usually (afte

5条回答
  •  你的背包
    2021-01-29 18:58

    There's an interesting (if slightly short) chapter in Beautiful Code by Brian Kernighan, appropriately called "A Regular Expression Matcher". In it he discusses a simple matcher that can match literal characters, and the .^$* symbols.

提交回复
热议问题