Replace each substring which matches with the given regular expression with the given replacement.
1 string.replaceAll
<string.replaceAll>
<text /> !
<regexp /> !
<word /> !
</string.replaceAll>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Etext | string | Text in which perform the search. | |||
Eregexp | string | Regular expression to search. | |||
Eword | string | String by which it will be replaced. |
Returns | |
---|---|
Type | Description |
string | The resulting string. |
Exceptions
requires 3 arguments, received: ...
The 3 entry parameters has not been specified.
Example
Replace all the substring of characters 'to STRING' by 'SET'.
Copy
<xsql-script name='string_replaceAll_sample1'> <body> <set name='text'>This IS a STRING OF characters next to another STRING OF characters</set> <set name='regexp'>to STRING</set> <set name='word'>SET</set> <println> <string.replaceAll> <text /> <regexp /> <word/> </string.replaceAll> </println> </body> </xsql-script>
Returns:
Copy
This IS a SET OF characters next to another SET OF characters