i have a few triggers that match name(\,|[ ]|\.|\'|$) to be highlighted... but i dont really want that the "," "." and "'" be highlighted... any sugestion?
thank you..
Try:
name\b
The \b means "word boundary" but won't actually form part of the matching expression.
Alternatively, try turning off "capturing of the sub-expression" like this:
name(?:\,|[ ]|\.|\'|$)
im sorry Nick but either options work... the first dont match with the names and the second keep highlightning the , . and ' too..
thank you anyway
The first one should work - make it a regular expression. I tried:
nick\b
This highlighted "nick" on its own or as "nick," (the word, not the comma), however did not highlight "nickel".
hmm this is a litle strange i tried create the trigger manualy and the \bname\b works well but when is created from a script i cant put it in work... it simply dont match.
i think i forgot to tell it from start that i was doing it from a script that takes a few names from an array and creates the same number of triggers. *blush*
thank you Nick and im sorry to take all this time from you for this silly thing *smile*
If you are adding it from JScript or Perlscript you probably need to "escape" the backslashes by doubling them (eg. \\ instead of \ ).