* escape

Posted by Artel on Fri 16 Jul 2004 08:22 PM — 4 posts, 19,849 views.

USA #0
i have a trigger to respond to a message:

*** Example! (message) ***
Send: nobletalk blah blah

i tried ^*** Example! (message) ***$ and I got an error, so I put backslashes in: ^\*\*\* Example! (message) \*\*\*$

Nothing happens..
Are the parentheses or exclaimation marks causing this? Or is the * off?
USA #1
This was recently discussed. See:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4440

That should help.
USA #2
as I understand, the \* is supposed to work? That's what help files and the forum says, but it's not working
USA #3
Yes.
The ONLY way to match an asterisk is with a regular expression. Which is a more powerful form of trigger. \ is an escape character, because in a regexp, * is something that means something.

so \* tells the regexp engine to not think of * as instructions, but as simple characters instead.

So youll need to have "regular expression" checked to use it.

Try...
^\*\*\* Example\! \(message\) \*\*\*$

Regexps are EXTREMELY fickle, you might have leading (or trailing) spaces or perhaps a second space in between message and the next asterisks, and that will throw off your trigger.