|
blooga Newbie
Joined: 05 Dec 2002 Posts: 1 Location: United Kingdom
|
Posted: Thu Dec 05, 2002 7:16 pm
using trigger text |
If you have a trigger that uses wildcards, and matches part of the trigger line, how do you extract the text that set off the trigger? %trigger gives the whole line, but I just want the part of %trigger that matched.
blooga |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Dec 05, 2002 11:39 pm |
If you surround wildcards in parenthesis, the text that matched the wildcard is available through %1..%n. The rest of the text that is not wildcards, is already known to you. Example:
#TRIGGER {gets a (*) from (*).} {#SH The first wildcard matched: %1;#SH The second wildcard matched: %2;#SH The part of the line that fired the trigger was: gets a %1 from %2.} "" {notrig}
Kjata |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|