I have many log entries that start with the text “QM42VT2”. I am trying to use the manual filter “Message -> like (regex)” to show those lines. I have tried many combinations of the regex string like:
^QM42VT2
^QM42VT2*
“^QM42VT2”
“^QM42VT2*”
But always get no logs entries shown. Here is an example log entry I am trying to show:
[Entry id=1087, date=2022-01-11 21:46:51.801, level=INFO, thread=pool-5-thread-1, emitter=com.Rexnord.Properties.Computed.WindowedDoubleProperty, message="QM42VT2:LoSpdOut:GMF-4-3xAvgIPS" value: 4.878638428635895E-4]
Any idea why this is not working?
How to use message -> like (regex) to match beginning of line
Moderator: admin
-
- Posts: 2
- Joined: Wed Jan 12, 2022 8:41 pm
Re: How to use message -> like (regex) to match beginning of line
We actually followed-up this conversation over email In case it helps others on this forum, the regex that should be used here is:
(to match every string starting with "QM42VT2, quote included)
Code: Select all
^"QM42VT2.*
-
- Posts: 2
- Joined: Wed Jan 12, 2022 8:41 pm
Re: How to use message -> like (regex) to match beginning of line
Thanks for answering this. I also found the following to be helpful:
The missing part was the “.*” at the end, which means “any character, any number of times” (“.” means “any character”, and “*” means “0 or more times”)
You can learn more about Regular expressions syntax here:
https://docs.oracle.com/javase/8/docs/a ... ttern.html
The missing part was the “.*” at the end, which means “any character, any number of times” (“.” means “any character”, and “*” means “0 or more times”)
You can learn more about Regular expressions syntax here:
https://docs.oracle.com/javase/8/docs/a ... ttern.html
Re: How to use message -> like (regex) to match beginning of line
You're right, thanks for sharing!