I have a set of triggers like:
^(\d\d:\d\d\s)?(\[hero\])(.*)
^(\d\d:\d\d\s)?(\[newbie\])(.*)
^(\d\d:\d\d\s)?(\[sales\])(.*)
^()(\[(gossip|bs|aod|events|druid|healer|bardic)\])(.*)
Which are intended to support setting a trigger that colors the indented lines that follow the initial channel. I use th following to reset the color so further indents don't do anything.
^()(\S{1,})(.*)
While it just occured to me while typing this that making it:
^(\d\d:\d\d\s)?(\S{1,})(.*)
would solve my immediate problem, I would prefer to not have to test for the channel name in the script. i.e. the current form is this:
1. Line triggers with [hero] - color set to color for the [hero] trigger.
2. ()(\S{1,})(.*) also matches in the next trigger, so check if it starts with [hero].
3. If it does, don't reset the color to 'no change', since we would be undoing what we just set.
4. Also match on key words like certain player names, etc. and color them seperately in other triggers.
I would like instead to use the (?<!stuff_to_ignore) feature of the regular expressions to eliminate the whole set of tests needed to make sure I don't turn off my trigger the same time I activate it. The script should 'only':
1. match on channel traffic.
2. get the color from the trigger that called it and set the one to color indented text to match.
So no special tests are needed, but I can't do it this way and also have 'keep evaluating' set to allow other triggers to take effect on the same line.
However after several attempts, including this one:
^(?<!\d\d:\d\d\s)(?<!\[)(?<!gossip|bs|aod|events|druid|healer|bardic)(?<!\])(.*)
all my attempts matched on 'any' line, instead of excluding the ones with the things I want to not-match in them. According to the regular expression docs, this should be possible, but I can't get it to work right. :p
^(\d\d:\d\d\s)?(\[hero\])(.*)
^(\d\d:\d\d\s)?(\[newbie\])(.*)
^(\d\d:\d\d\s)?(\[sales\])(.*)
^()(\[(gossip|bs|aod|events|druid|healer|bardic)\])(.*)
Which are intended to support setting a trigger that colors the indented lines that follow the initial channel. I use th following to reset the color so further indents don't do anything.
^()(\S{1,})(.*)
While it just occured to me while typing this that making it:
^(\d\d:\d\d\s)?(\S{1,})(.*)
would solve my immediate problem, I would prefer to not have to test for the channel name in the script. i.e. the current form is this:
1. Line triggers with [hero] - color set to color for the [hero] trigger.
2. ()(\S{1,})(.*) also matches in the next trigger, so check if it starts with [hero].
3. If it does, don't reset the color to 'no change', since we would be undoing what we just set.
4. Also match on key words like certain player names, etc. and color them seperately in other triggers.
I would like instead to use the (?<!stuff_to_ignore) feature of the regular expressions to eliminate the whole set of tests needed to make sure I don't turn off my trigger the same time I activate it. The script should 'only':
1. match on channel traffic.
2. get the color from the trigger that called it and set the one to color indented text to match.
So no special tests are needed, but I can't do it this way and also have 'keep evaluating' set to allow other triggers to take effect on the same line.
However after several attempts, including this one:
^(?<!\d\d:\d\d\s)(?<!\[)(?<!gossip|bs|aod|events|druid|healer|bardic)(?<!\])(.*)
all my attempts matched on 'any' line, instead of excluding the ones with the things I want to not-match in them. According to the regular expression docs, this should be possible, but I can't get it to work right. :p