JetBrains / ideolog

Interactive viewer for '.log' files.
MIT License
253 stars 55 forks source link

highlight patterns not case sensitive #51

Closed jayveeAtWork closed 5 years ago

jayveeAtWork commented 5 years ago

Highlight patterns in the settings are not case sensitive, but if they're regex, they should be. E.g. this pattern: ^(.*)(ERROR)(.*) matches this line (shortened to relevant part) because of the lowercase "error", while it shouldn't: (...) main] [ INFO] (00:23:38.467) Obtaining the error list of the solve into file (...)

I realise this example begs the obvious comment to use the brackets [] in the regex for the severity, alas, the log file is a mix of formats (don't ask - please don't ask) and the only thing they have in common is the uppercase severity INFO WARN ERROR. So for my use case I really need the regex to be applied correctly, i.e. case sensitive.

t1 commented 5 years ago

Try to prefix you regex with the embedded flag expression (?-i). This disables the case-insensitive matching :-)

jayveeAtWork commented 5 years ago

That solves it! Thanks @t1 !