Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel eScript Language Reference > Siebel eScript Commands > String Objects > string.replace() MethodThis method searches a string using the regular expression pattern defined by pattern. If a match is found, it is replaced by the substring defined by replexp. Syntaxstring.replace(pattern, replexp)
ReturnsThe original string with replacements according to pattern and replexp. UsageThe string is searched using the regular expression pattern defined by pattern. If a match is found, it is replaced by the substring defined by replexp. The parameter replexp may be:
If any replacements are made, appropriate RegExp object static properties such as RegExp.leftContext, RegExp.rightContext, and RegExp.$n are set. These properties provide more information about the replacements. The following table shows the special characters that may occur in a replacement expression. Examplevar rtn; // rtn == "one zzz three zzz one" // rtn == "one twozzz three twozzz one"; // rtn == "one 5 three 5 one" // rtn == "one twotwo three twotwo one"; |
![]() |
![]() ![]() |
Siebel eScript Language Reference |