Lasso Soft Inc. > Home

[ string_replace ]

Method

[String_Replace] takes three parameters: a string, a -Find keyword/value parameter, and a -Replace keyword/value parameter. Returns the string with the all instances of the -Find parameter replaced by the -Replace parameter. The find parameter is not case sensitive.

  • Syntax
string_replace('String Value',
-find='Pattern',
-replace='Pattern')
Examples
  • Beginner

To replace a word within a string:

Use the [String_Replace] method. The method replaces the first instance of the found pattern within the string. The following example replaces the word "Moose" with the word "Bear".

Code

string_replace('Moose hair', -find='Moose', -replace='Bear')

Result

Bear hair

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft