Name

substitute — Change a string by regular expression substitution

Synopsis

substitute(from,match pattern)
substitute(from,match pattern,result pattern)

Description

This expression changes a string into another string with regular expression matching.

  • In the first form, the result is the portion of the string value expression from that matches match pattern.
  • In the second form, the result is the result pattern applied to the result of matching from with the match pattern.

Example

This expression returns the last component (following the period) of all the package names.

substitute( to string, //.*\./, ///) all packages

Context

Count-Preserving

Applies to Type

string

Results in Type

string

browse-by-query home antlersoft free software sourceforge project page