---
schema_version: "1"
id: e2bdcbf22d68db6a4cf27dadac20de985b3846fea9ec09004b47026e532b5430
title: substringAfterLast
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.3/dw-strings-functions-substringafterlast.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.3/dw-strings-functions-substringafterlast
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 7543aa153d4e37a6e1ac6f91e1fc15278142817c8ce29e5f677f9a68e62c4923
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# substringAfterLast

## [](#substringafterlast1)substringAfterLast(String, String): String

区切り文字の最後の出現位置より後にあるサブ文字列を取得します。区切り文字は返されません。

_DataWeave 2.2.0 で導入されました。Mule 4.2 以降でサポートされます。_​

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

<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>separator</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">検索対象の文字列。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、さまざまな入力とサイズでの ​`substringAfterLast`​ の動作を示します。

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

```DataWeave
%dw 2.0
import * from dw::core::Strings
output application/json
---
{
  "a": substringAfterLast(null, "'"),
  "b": substringAfterLast("", "-"),
  "c": substringAfterLast("abc", "b"),
  "d": substringAfterLast("abcba", "b"),
  "e": substringAfterLast("abc", "d"),
  "f": substringAfterLast("abc", "")
}
```

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

```JSON
{
 "a": null,
 "b": "",
 "c": "c",
 "d": "a",
 "e": "",
 "f": null
}
```

## [](#substringafterlast2)substringAfterLast(Null, String): Null

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