replaceAll

Replaces all occurrences matching the target string by the replacement string in the base string.

The replacement proceeds from the beginning of the string to the end, for example, replacing “aa” with “b” in the string “aaa” will result in “ba” rather than “ab”.

Category

String

Function syntax

replaceAll(<parameters>)

Parameters

Parameter Type
base string
target string
replacement string

Signature and returned type

replaceAll(<baseString>,<sourceString>,<replacementString>)

Returns a string.

Example

replaceAll("Hello World", "l", "x")

Returns “Hexxo Worxd”.

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now