

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Replace
<a name="replace-function"></a>

`replace` は、文字列の一部を、指定した別の文字列に置き換えます。

## 構文
<a name="replace-function-syntax"></a>

```
replace(expression, substring, replacement)
```

## 引数
<a name="replace-function-arguments"></a>

 *expression*   
expression は文字列である必要があります。文字列データ型を使用しているフィールドの名前、**'12 Main Street'** のようなリテラル値、または文字列を出力する別の関数の呼び出しを使用できます。

 *substring*   
*expression* の中で置き換える一連の文字。substring は *expression* の中で複数回出現することがあります。

 *replacement*   
*substring* を置き換える文字列。

## 戻り型
<a name="replace-function-return-type"></a>

String

## 例
<a name="replace-function-example"></a>

次の例では、部分文字列 'and' を 'or' で置き換えています。

```
replace('1 and 2 and 3', 'and', 'or')
```

次の文字列が返されます。

```
1 or 2 or 3
```