Lasso Soft Inc. > Home

[String_Replace]

[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
  • Parameters
[String_Replace: 'String Value',
  -Find='Pattern',
  -Replace='Pattern']
Required Parameters
String Value The string which should be modified.
-Find The value which is to be found.
-Replace The value which is to replace each instance of the found parameter.
Optional Parameters
Encoding Keyword Specifies the encoding for the tag's return value. Tags are encoded using -EncodeHTML by default if their value is output on a format file. No encoding is applied to nested tags unless an explicity encoding keyword is specified. One of -EncodeBreak, -EncodeHTML, -EncodeNone, -EncodeRaw, -EncodeSmart, -EncodeStrictURL, -EncodeURL, -EncodeXML.
Examples

To replace a word within a string:

Use the [String_Replace] tag. The tag replaces the first instance of the found pattern within the string. The following example replaces the word Green with the word Blue.

[String_Replace: 'Green World', -Find='Green', -Replace='Blue']
Result:
Blue World
Tag Link [String_Replace] Category String
Type Substitution Data Source Any
Support Preferred Version 2.5
Output Type String Security None
Implementation Internal Sets Lasso 6.0, Lasso 5.0,LDML3x,LDML25

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