> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/wild.zh.md).

# Wild

**Wild** 对象允许脚本访问 Opus 内置的模式匹配功能。尽管大多数 ActiveX 脚本语言都有自己的模式匹配支持（通常是通过某种正则表达式系统），但您可能希望使用 Opus 提供的模式匹配功能，以便与内部 Opus 函数保持一致。

您可以使用 [**FSUtil**](/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/fsutil.zh.md)**.NewWild** 方法创建 **Wild** 对象。要使用 **Wild** 对象，您必须首先指定要匹配的模式（此步骤称为“解析模式”。您可以在创建时或稍后使用 **Parse** 方法进行此操作。一旦对象具有模式，您就可以调用 **Match** 方法来测试字符串是否与模式匹配。

| 属性名称    | 返回类型  | 说明               |
| ------- | ----- | ---------------- |
| *<默认值>* | *字符串* | 返回 Wild 对象中的当前模式 |

| 方法名称         | **参数**                      | 返回类型  | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------ | --------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| EscapeString | <p><字符串:输入><br><字符串:类型></p> | *字符串* | <p>转义输入字符串中的所有通配符并返回结果。例如，"<strong>the \* 'dog' said</strong> *" 将被转换为 "<strong>the '* ''dog'' said '</strong>\*"。</p><p>可选的类型参数允许您指定转换：<br><em>none</em>: 转义在 <a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh/pattern_matching_syntax.zh.md">标准模式匹配</a> 中使用的字符<br><strong>r</strong>: 转义在 <a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh/regular_expression_syntax.zh.md">正则表达式</a> 中使用的字符<br><strong>b</strong>: 将所有反斜杠加倍<br><strong>n</strong>: 将所有反斜杠加倍，这些反斜杠位于字母 '<strong>n</strong>' 之前<br>请注意，这些模式不能组合。</p> |
| Match        | <字符串:测试>                    | *布尔*  | 将指定的字符串与之前解析的模式进行比较，如果匹配，则返回 **True**。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Parse        | <p><字符串:模式><br><字符串:标志></p> | *布尔*  | <p>解析提供的模式。标志字符串是可选的 - 如果提供，它必须是一个字符串，包含以下一个或多个字符：</p><p><strong>c</strong> - 区分大小写（否则模式匹配不区分大小写）<br><strong>d</strong> - 仅限 DOS（仅支持标准 MS-DOS 通配符）<br><strong>f</strong> - 文件名模式（对匹配文件名进行特殊处理）<br><strong>r</strong> - 正则表达式（否则使用 <a href="/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh/pattern_matching_syntax.zh.md">标准模式匹配</a>）</p>                                                                                                                                                                                                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://chaoses-ib.gitbook.io/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/wild.zh.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
