Selective text hightlighting?

Posted by Ashass on Wed 10 Dec 2008 03:34 PM — 5 posts, 22,400 views.

#0
I made a very basic target trigger, and am now looking to make a more advanced one. Currently the text is matched by name, and blanket changes everything on the line to orange.

Is there a way to =just= match the name and change it to orange?

Typically the format for the name would be in

* name
* name *
name *

I don't want the surrounding text highlighted, just the name.


Current (annoying) target trigger:
<aliases>
<alias
match="target *"
enabled="y"
variable="target"
send_to="9"
sequence="100"
>
<send>%1</send>
</alias>
</aliases>

<triggers>
<trigger
custom_colour="17"
enabled="y"
expand_variables="y"
match="*@target*"
sequence="100"
other_text_colour="orangered"
>
</trigger>
</triggers>
Netherlands #1
Try: \b@target\b

with regular expression activated. The \b means it will be processed as a word, meaning it needs a space, comma, dot, quote, etc next to it so you won't match stuff halfway in a word.
#2
That works, except there is a minor issue of matching the entire name now -- when I'm out pking, I would typically only use 2-3 letters from someones name (like m ela for murder elanesse)

I would need ela* to be highlighted, with anything after the space to not be matched.

so m ela

highlights

Elanesse stands here.
USA #3
\b@target\w*\b

will do that.
#4
100% perfect! Thank you!