Lasso Soft Inc. > Home

[RegExp->ReplaceAll]

[RegExp->ReplaceAll] is a utility tag which replaces every instance of the find pattern in the input string with the replacement pattern and returns the result. The tag accepts optional parameters to override the -Find, -Replace, or -Input with new values.

The [RegExp->Replacefirst] tag functions similarly, but replaces only the first instance of the find pattern in the input string with the replacement pattern.

Usually this tag will be used to apply the same find and replacement pattern against several different inputs. Since the find and replacement patterns are only compiled once a series of search/replace operations on different strings can be performed faster than with individual [String_ReplaceRegExp] tags.

  • Syntax
  • Parameters
[(RegExp: -Find='[aeiou]', -Replace='*', -Input='The quick brown fox', -IgnoreCase)->ReplaceAll]
Optional Parameters
-Find Specifies a new find pattern to use for the search/replace operation. Defaults to the current stored find pattern.
-Replace Specifies a new replacement pattern to use for the search/replace operation. Defaults to the current stored replacement pattern.
-Input Specifies the input to run the search/replace operation on. Defaults to the current stored input string.
-IgnoreCase If specified the search/replace operation is performed without regard to case. Defaults to the current setting in the regular expression type.
Examples

See the Lasso 8 Language Guide for examples of how to use this tag.

Tag Link [RegExp->ReplaceAll] Category String
Type Member Data Source Any
Support Preferred Version 8.5
Output Type None Security None
Implementation Sets Lasso 8.5

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