$WBREPL - replace string

$WBREPL  is available for use with all WBSP commands:


sourcetext - text on which to perform the replacement
stringtobereplaced - text to be searched for inside sourcetext
stringtoreplacewith - text to replace for every successful match of stringtobereplaced in sourcetext
casesensitive - optional parameter  - if set to true (T,ON,1) WhizBase will perform case sensitive search (so "A" will not match "a")

A copy of sourcetext with every occurrence of stringtobereplaced replaced by stringtoreplacewith.


<title>WBREPL example</title>
Original text: The rain in Spain stays mainly in plains.<br>
Changed text: $WBREPL[The rain in Spain stays mainly in plains.|Spain|France]

After running this example, the resulting page in browser, may look like this:

Original text: The rain in Spain stays mainly in plains.
Changed text: The rain in France stays mainly in plains.