Trigger question

Posted by LucianDK on Fri 21 Apr 2017 11:07 AM — 5 posts, 19,237 views.

#0
I am trying to write a trigger that works when an exact name is mentioned and coloring the whole action with the color chosen for the name. Such as 'Foster waves to you' or Have you seen Foster? Which would be wholly in the lightbrown color ive chosen for his name.

But not triggering when words incorporating the name is mentioned. Like Fostered by wolves. Or whom is your Fosterfather?

I cant figure out how to only make the trigger activate on an exact wordmatch and still coloring the whole of the action.
USA Global Moderator #1
Use the "regular expression" option, and make your pattern:

\bFoster\b


\b in PCRE indicates a word boundary.

Coloring would be done by making it a color trigger. I'm pretty sure those always do the whole line.
Amended on Fri 21 Apr 2017 11:45 AM by Fiendish
#2
Tried that, Fiendish. Only the name gets colored, nothing else in the rest of the line.

edit:
http://imgur.com/a/wuU2j
Amended on Fri 21 Apr 2017 11:56 AM by LucianDK
USA Global Moderator #3
I guess I remembered wrong, then. Maybe put .* at the beginning and end of your pattern.

Like:

^.*\bFoster\b.*$
Amended on Fri 21 Apr 2017 11:56 AM by Fiendish
#4
That seems to have done the trick, cheers.