---
schema_version: "1"
id: 7ae1a8eb4d0ba8057295dfeccc61210722454c2fbf9520042a593b52432c5d46
title: matches
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.3/dw-core-functions-matches.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.3/dw-core-functions-matches
source_site: docs.mulesoft.com
content_type: documentation
content_hash: e7f233cb61d40b8631229bbe9fff498a4b89ec8215923cbc0c64aa619bf393f3
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# matches

## [](#matches1)matches(String, Regex): Boolean

式が入力文字列全体に一致するかどうかを確認します。

一致した値を出力するか、条件付きで処理する必要があるユースケースの場合は、 [「DataWeave のパターン一致」](https://docs.mulesoft.com/mule-runtime/4.3/dataweave-pattern-matching)​を参照してください。

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>text</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">入力文字列。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>matcher</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">文字列内の文字を照合する Java 正規表現。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例は、正規表現が入力文字列と一致するかどうかを示します。 `matches(text,matcher)`​ 表記 (​`matches("admin123", /a.*\d+/)`​ など) を使用することも できます。

#### [](#ソース)ソース

```DataWeave
%dw 2.0
output application/json
---
[ ("admin123" matches /a.*\d+/), ("admin123" matches /^b.+/) ]
```

#### [](#出力)出力

```JSON
[ true, false ]
```