> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-mintlify-b90d3c69.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# RegexExtract - ComfyUI Built-in Node Documentation

> Complete documentation for the RegexExtract node in ComfyUI. Learn its inputs, outputs, parameters and usage.

RegexExtract 节点使用正则表达式在文本中搜索模式。它可以查找第一个匹配项、所有匹配项、匹配项中的特定分组，或跨多个匹配项的所有分组。该节点支持多种正则表达式标志，用于控制大小写敏感性、多行匹配和点号匹配换行符的行为。

## 输入

| 参数        | 描述                                  | 数据类型    | 是否必填 | 范围                                                                    |
| --------- | ----------------------------------- | ------- | ---- | --------------------------------------------------------------------- |
| `字符串`     | 用于搜索模式的输入文本                         | STRING  | 是    | -                                                                     |
| `正则表达式模式` | 用于搜索的正则表达式模式                        | STRING  | 是    | -                                                                     |
| `模式`      | 提取模式决定返回匹配项的哪些部分（默认值："First Match"） | COMBO   | 是    | "First Match"<br />"All Matches"<br />"First Group"<br />"All Groups" |
| `忽略大小写`   | 匹配时是否忽略大小写（默认值：True）                | BOOLEAN | 否    | -                                                                     |
| `多行模式`    | 是否将字符串视为多行（默认值：False）               | BOOLEAN | 否    | -                                                                     |
| `点号匹配所有`  | 点号（.）是否匹配换行符（默认值：False）             | BOOLEAN | 否    | -                                                                     |
| `分组索引`    | 使用分组模式时提取的捕获组索引（默认值：1）              | INT     | 否    | 0-100                                                                 |

**注意：** 使用"First Group"或"All Groups"模式时，`group_index` 参数指定要提取的捕获组。组 0 表示整个匹配项，而组 1+ 表示正则表达式模式中的编号捕获组。

## 输出

| 输出名称     | 描述             | 数据类型   |
| -------- | -------------- | ------ |
| `output` | 根据所选模式和参数提取的文本 | STRING |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/RegexExtract/zh.md)

***

**Source fingerprint (SHA-256):** `38e365d21bea966ed65bc78c184766330924fe75392cdb88c6978052037f5d5f`
