1%%[
2 Var @variable,
3 @stringReplaceLowercase,
4 @stringReplaceSentenceCase,
5 @stringReplaceUppercase
6
7 Set @variable = "Hello world!"
8
9 /* Note the variations in capitalization in the Replace() function. */
10 Set @stringReplaceLowercase = replace(@variable, "world", "friend")
11 Set @stringReplaceSentenceCase = Replace(@variable, "world", "friend")
12 Set @stringReplaceUppercase = REPLACE(@variable, "world", "friend")
13]%%
14
15<table border=1>
16 <tr>
17 <th>Original text</th>
18 <th>Function</th>
19 <th>Result</th>
20 </tr>
21 <tr>
22 <td>Hello world!</td>
23 <td><code>replace(@variable, "world", "friend")</code></td>
24 <td>%%=v(@stringReplaceLowercase)=%%</td>
25 </tr>
26 <tr>
27 <td>Hello world!</td>
28 <td><code>Replace(@variable, "world", "friend")</code></td>
29 <td>%%=v(@stringReplaceSentenceCase)=%%</td>
30 </tr>
31 <tr>
32 <td>Hello world!</td>
33 <td><code>REPLACE(@variable, "world", "friend")</code></td>
34 <td>%%=v(@stringReplaceUppercase)=%%</td>
35 </tr>
36</table>