$remtok

From Scriptwiki
Revision as of 22:13, 25 November 2005 by Doomie (talk | contribs)

Jump to: navigation, search

Removes the Nth matching token from text.

$remtok(text,token,N,C)

Note that if you do not specify N, it will remove the first instance of the token you have specifed.

Example

echo -ag $remtok(This is a moo test, moo, 1, 32)

This echo's This is a test, as moo is removed from the text.


var %mytext = This word will remove a word
var %token = word
echo -ag $remtok(%mytext,%token,32)

This example will remove the first instance of the word word and so echos: This will remove a word.