# Replace - スクリプトおよびチャート関数

Replace() は、指定された文字列内に含まれる指定されたサブストリングすべてを別のサブストリングで置き換えた文字列を返します。この関数は非再帰関数で、左から右へ処理されます。

構文:

Replace(text, from\_str, to\_str)

戻り値データ型： 文字列

引数：

引数

| 引数 | 説明 |
| --- | --- |
| text | 元の文字列。 |
| from\_str | 入力文字列 text に 1 回以上現れる文字列。 |
| to\_str | text文字列に現れる from\_str をすべて置き換える文字列。 |

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Replace.htm)

#### 例と結果:

| 例 | 結果 |
| --- | --- |
| `Replace('abccde','cc','xyz')` | 'abxyzde' を返します |

## 詳細を見る

* [Replace](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/Scripting/Replace.htm)