Features
Support
Purchase
Documentation
Download
Login
Register
Login
Register
Home
»
LogViewPlus Support
»
Features & Suggestions
»
Non-greedy string specifier in the Pattern parser?
Non-greedy string specifier in the Pattern parser?
Post Reply
Like
4
Non-greedy string specifier in the Pattern parser?
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Zoltan Kelemen
Zoltan Kelemen
posted 3 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 21,
Visits: 97
Hi,
I was wondering if it would be possible to add an option to %S - or perhaps have another string specifier - that would act non-greedy, i.e. match the first occurrence of the following separator, not the last?
i.e. I have the following line, say
2022-05-12T19:21:25.065+0200; DEBUG; hostname123; P4216/T31; [Component];
Conversation state changed
: ACTIVE -> ACTIVE. Call leg state changed: CallLegStateChange[ACTIVE->ACTIVE for callLeg: CallLeg [
2c8a32f9066d396540b7024414c86fe8@1.2.3.4
-- D-638b5c9f-b60e-4d55-9544-cdbc51b5cd06] state: ActiveState@4b9f5055, status=UnknownStatus@2fb72ab2, additionalData=null];
And I'd like to parse this with:
%d{yyyy-MM-ddT%H:mm:ss.fffzzzz}; %p; %c; %t; [%S{Component}]; %S{Action}: %m%n
Where I'd want the Action field to be "
Conversation state changed
"
I can't really seem to make this work with a Pattern Parser.
Probably could either do a custom parser, or a regex parser, but I was thinking this feature may be a useful addition to the simple pattern parser as well.
Thanks,
Zoltan
Reply
Like
4
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Non-greedy string specifier in the Pattern parser?
keli
-
3 Years Ago
Hi Zoltan, The example provided seems to work as you would expect:...
LogViewPlus Support
-
3 Years Ago
Oh, burn :D I was hoping I can come up with a simple example, but...
keli
-
3 Years Ago
No worries Zoltan - glad that helped. :-)
LogViewPlus Support
-
3 Years Ago
Post Reply
Like
4
Similar Topics
Post Quoted Reply
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search