知识卡片

普通读书笔记卡 · 6650.c · 生成模型:GPT-6

模式的重复范围须按实际语法解释

理解等级:中级

正则星号作用于紧邻的前一项,字符类表示可选字符,分组和或运算规定组合关系。模式允许重复不能推成已覆盖自然语言所有变体;简单(hi|hello|hey)本身也不会自动匹配任意多个i。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      #2 | means “OR,” and \* means the preceding characters can occur 0 or more times and still match. #3 Ignoring the character case means this regular expression will match “Hey” as well as “hey.” In regular expressions, you can specify a character class with square brackets, and you can use a dash (-) to indicate a range of characters without having to type all

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第01章《会读写的机器与自然语言处理》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-1.html) - 结论依据:摘录中关于模式的重复范围须按实际语法解释的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:#2 | means “OR,” and \* means the preceding characters can occur 0 or more times and still match. #3 Ignoring the character case means this regular expression will match “Hey” as well as “hey.” In regular expressions, you can specify a character class with square brackets, and you can use a dash (-) to indicate a range of characters without having to type all