正则语言 (Regular Languages)

定义 (Definition): 正则语言是可以通过正则表达式描述的语言。正则语言由有限自动机(DFA 或 NFA)识别。

Regular languages are languages that can be described by regular expressions. They are recognized by finite automata (either DFA or NFA).

正则表达式 (Regular Expressions)

正则表达式是描述正则语言的形式化方法。常见的运算符包括:

Regular expressions are a formal method for describing regular languages. Common operators include:

  • 连接 (Concatenation): 表示 后接

    denotes followed by .

  • 并 (Union): 表示

    denotes or .

  • Kleene 星 (Kleene Star): 表示零个或多个

    denotes zero or more occurrences of .

  • 括号 (Parentheses): 用于改变运算的优先级,例如 表示 的零个或多个重复。

    Used to change the precedence of operations, e.g., denotes zero or more repetitions of .