/replace

Function usage:

REPLACE(old, new, string)

Command usage:

/REPLACE old new string


Echoes (in command form) or returns (in function form) string, with any occurrences of old in string replaced by new.

Example:

This example replaces "TF" with "TinyFugue" in every line sent by the server.

  /def -mregexp -t"TF" replace_tf = \
      /test substitute(replace("TF", "TinyFugue", {P0}))

See: evaluation, /tr


Back to index
Back to tf home page
Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys