13

Recently I discovered iTerm2's wonderful feature: triggers. Now I want iTerm to highlight some pieces of text, for exampeo error, fatal, etc. I want those triggers to be case-insensitive, but I'm having a hard time setting up these triggers. According the documentation, iTerm's regular expressions are conform the ICU regular expressions rules, which state that I can use the (?i) flag to match case insensitive.

I tried a lot, including (?i)/error, (?i)error, etc., but none work. Please see screenshot below; any idea how to match case insensitive?

enter image description here

Rogier Lommers
  • 2,263
  • 3
  • 24
  • 38
  • Acc. to https://www.iterm2.com/documentation-triggers.html where the ICU regex flavor is mentioned as the one used in iTerm2, your `(?i)...` is bound to work. The question is off-topic. – Wiktor Stribiżew Nov 02 '16 at 07:10
  • 1
    @WiktorStribiżew: why does a difference between documented behavior and _actual behavior_ make a question off-topic? – iconoclast Feb 07 '19 at 02:47
  • @iconoclast Because the current OP regex works. Anyway, it is even a dupe. – Wiktor Stribiżew Feb 07 '19 at 08:32
  • 3
    @WiktorStribiżew: the other two questions don't mention iTerm2. Surely you've used regexes enough to be aware that there are different implementations in different apps & languages & utilities. Even different things that claim to use PCRE don't always do so. Anyway, your new claim (that it's a dupe) doesn't defend your initial claim that it's off-topic because he was experiencing undocumented behavior. I think both of your claims are extremely questionable. – iconoclast Feb 08 '19 at 02:48

1 Answers1

16

Well, for some reason after clearing out all rules and entering the following, it all started to work :).

(?i)error|panic|fatal

Rogier Lommers
  • 2,263
  • 3
  • 24
  • 38