regexReplaceAll

Searches a string for a specific pattern using a regular expression to do matching and replacing. Regular expression constructs can contain characters, character classes, and other classes and quantifiers. See http://java.sun.com for details about the Java API for Class Pattern.

This feature is only available with JVM 1.4 or later versions; this is the default version for Content Server version 7.0 and later.

It replaces all instances of the regular expression with the replacement string.

Type and Usage

Parameters

This function takes three parameters:

  • The first parameter is the original string.

  • The second parameter is the string to match.

  • The third parameter is the replacement string.

Example

The following example returns xyzdef xyzdef:

<$regexReplaceAll("abcdef abcdef","abc","xyz")$>

See Also