9 Regular Expressions🔗

本章是 [Sitaram05] 的修改版本。

regexp 值封装了一个由字符串或 byte string 描述的 模式。当调用 regexp-match 等函数时,regexp 匹配器尝试将此 模式与另一个字符串或字节串(我们称其为 文本字符串)的(部分) 内容进行匹配。文本字符串被视为原始文本,而非模式。

    9.1 Writing Regexp Patterns

    9.2 Matching Regexp Patterns

    9.3 Basic Assertions

    9.4 Characters and Character Classes

      9.4.1 Some Frequently Used Character Classes

      9.4.2 POSIX character classes

    9.5 Quantifiers

    9.6 Clusters

      9.6.1 Backreferences

      9.6.2 Non-capturing Clusters

      9.6.3 Cloisters

    9.7 Alternation

    9.8 Backtracking

    9.9 Looking Ahead and Behind

      9.9.1 Lookahead

      9.9.2 Lookbehind

    9.10 An Extended Example

+(part ("(lib scribblings/reference/reference.scrbl)" "regexp")) in (part ("(lib scribblings/reference/reference.scrbl)" "top")) provides more on regexps.