> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kasoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# arc:match

> 使用 arc:match 对值执行复杂模式匹配，支持精确、正则和 glob 匹配类型。

export const siteNameShort = "知行之桥";

arc:match 关键字和 [arc:equals](./op-arc-equals) 关键字相似；但是它允许复杂的匹配规则。

## 参数

* **pattern**：匹配的模式。

* **type**：匹配的类型。默认值是 “exact”，需要值的完全匹配。在这种情况下，arc:match 与 [arc:equals](./op-arc-equals) 是一样的。其它支持的类型有 “regex”，用于正则表达式匹配，以及 “glob”，支持一种类似于文件名模式的简单表达式模型，例如，\*.txt。
  * 应用程序的 .NET 版本使用 .NET Framework 版本的正则表达式匹配。
  * 跨平台版本使用 Java 正则表达式构造。

* **value**：要匹配的值。

## 控制属性

无

## 示例

使用 regex 检查浮点数，如果模式匹配，则该对象将被推出。

```xml theme={null}
<arc:match pattern="[-+]?[0-9]*.?[0-9]*" type="regex" value="-3.14">
  <arc:push/>
</arc:match>
```

## 另请参阅

* [arc:select](./op-arc-select)：比较多个值。
