|
Pogi Newbie
Joined: 04 Aug 2008 Posts: 9 Location: Washington
|
Posted: Thu Feb 12, 2009 7:14 am
Help with a Verbatim Trigger |
Hi everyone, sorry if this question is easy to answer, and believe me I looked for a long time and just couldn't find an answer on my own. Ok here is my question.
I would like to make a trigger that procs on a pattern, but only when the pattern is by itself on one line. I don't want it to proc if there is anything before, or after the pattern on a line.
I actually want to make a lot of triggers this way, but here's one of them for an example so that way you guys know exactly what I mean.
I want to trigger a command (doesn't matter what, it will change anwyays) on this pattern:
Your white aura fades.
I don't want it to trig if for example if someone says it:
John says, 'Your white aura fades'
This would just get me into bad situations. So is there any way to make the trigger work only if the pattern is by itself on a line?
Thanks for any help you guys can offer. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Feb 12, 2009 7:27 am |
Yes you want to use line anchors that Pattern Matching offers. Specifically '^' which matches the beginning of a line, and '$' which matches the end of a line.
|
|
_________________ Asati di tempari! |
|
|
|
Pogi Newbie
Joined: 04 Aug 2008 Posts: 9 Location: Washington
|
Posted: Thu Feb 12, 2009 7:37 am |
Ahh that is great, thank you so much! This really simplifies everything. Although clicking on that link, at first few glances, I still couldn't find the information you gave me. So thanks for telling me specifically what to have!
|
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Thu Feb 12, 2009 1:52 pm |
Several lines down
Quote: |
^ force pattern to match starting at the beginning of the line
$ force pattern to match ending at the end of the line |
|
|
|
|
|
|