对变量进行简单的搜索和替换。 等同于PHP函数的 `str_replace()`。 <table border="1"> <colgroup> <col align="center"> <col align="center"> <col align="center"> <col align="center"> <col> </colgroup> <thead><tr> <th align="center">参数顺序</th> <th align="center">类型</th> <th align="center">必选参数</th> <th align="center">默认值</th> <th>说明</th> </tr></thead> <tbody> <tr> <td align="center">1</td> <td align="center">string</td> <td align="center">Yes</td> <td align="center"><span class="emphasis"><em>n/a</em></span></td> <td>需要搜索并替换的字符</td> </tr> <tr> <td align="center">2</td> <td align="center">string</td> <td align="center">Yes</td> <td align="center"><span class="emphasis"><em>n/a</em></span></td> <td>替换用的字符</td> </tr> </tbody> </table> 例子: articleTitle:`Child's Stool Great for Use in Garden.` 模板: ``` _{$articleTitle}_ _{$articleTitle|replace:'Garden':'Vineyard'}_ _{$articleTitle|replace:' ':' '}_ ``` 输出: ``` Child's Stool Great for Use in Garden. Child's Stool Great for Use in Vineyard. Child's Stool Great for Use in Garden. ```