Colour trigger in specific circumstances

Posted by Clomly on Sun 21 Oct 2007 10:33 PM — 3 posts, 16,679 views.

#0
Sorry if this has been covered before. I searched but couldn't find anything on it.
I'm trying to make a colour trigger that will highlight a single word (or multiple words in one line if they match a list) but only if the line ends in a certain string (which I do not want highlighted).
Ie. a line such as
A young Ephebian recruit, two skinny Ephebian recruits, a nervous Djelian recruit, a skinny Djelian recruit and a disciplined Ephebian soldier are fighting here.
I would like to highlight recruit and soldier every time they appear, but only if the line ends in "here."
I've managed the recruit and soldier part (just match soldier|recruit|recruits|etc) but can't seem to make it conditional.
Thanks in advance,
Clomly
Russia #1
This trigger seems to do the job:

<triggers>
  <trigger
   custom_colour="3"
   enabled="y"
   match="(soldier|recruit|recruits)+(?=.*? are fighting here\.$)"
   regexp="y"
   repeat="y"
   sequence="100"
  >
  </trigger>
</triggers>


Note the 'repeat on same line' option.
#2
Thank you.