---
schema_version: "1"
id: 5f5f31d4dd85e325745e14195105dc06ee6e837e74912694581ef0999bb80f16
title: 削除
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.4/dw-strings-functions-remove.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-remove
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 4eabcb33a10457b3a26c6f6c9fbfa2a3505628b1c129437feb136be7905aa47d
description: MuleSoft Documentation Site
release: "2.4"
latest: false
---
# 削除

## [](#remove1)remove(text: String, toRemove: String): String

文字列から指定されたパターンのすべての出現を削除します。

_DataWeave バージョン 2.4.0 で導入されました。_​

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

<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>toRemove</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">削除するパターン。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、​`remove`​ を使用して不要なプロパティを削除する方法を示しています。

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

```DataWeave
%dw 2.0
import remove from dw::core::Strings
output application/json
---
"lazyness purity state higher-order stateful" remove "state"
```

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

```Json
"lazyness purity  higher-order ful"
```

## [](#remove2)remove(text: Null, toRemove: Any): Null

`remove`​ を ​`null`​ 値に使用できるようにするヘルパー関数。

_DataWeave バージョン 2.4.0 で導入されました。_​