Documentation

#PSUB

PSUB

Syntax: #PSUB text XStart XEnd YStart YEnd
Related: #SUB

Replaces text on the line. If text is empty "", then text is deleted from the line. If XStart is omitted, the beginning of the line is used. If XEnd is omitted, the end of the line is used. YStart and YEnd are relative to the current line. If omitted, the current line is used. If YStart is 1, the previous line is used, etc.

The %x1..%x99 variables can be used for "XStart XEnd" to give position of patterns matched in a trigger.

PSUB Example

#TRIGGER {(%w) tells you} {#PSUB {[%1]} %x1}
When the server sends "Someone tells you...", this trigger substitutes the first matching pattern and puts [] around it, resulting in "[Someone] tells you"

Add comment

Login or register to post comments