﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>LogViewPlus Support » LogViewPlus Support » Features &amp; Suggestions  » Non-greedy string specifier in the Pattern parser?</title><generator>InstantForum 2017-1 Final</generator><description>LogViewPlus Support</description><link>https://www.logviewplus.com/forum/</link><webMaster>LogViewPlus Support</webMaster><lastBuildDate>Sat, 02 May 2026 21:26:59 GMT</lastBuildDate><ttl>20</ttl><item><title>Non-greedy string specifier in the Pattern parser?</title><link>https://www.logviewplus.com/forum/post/1471</link><description>Hi,&lt;br/&gt;&lt;br/&gt;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?&lt;br/&gt;&lt;br/&gt;i.e. I have the following line, say&lt;br/&gt;&lt;br/&gt;&lt;font face="Courier New"&gt;2022-05-12T19:21:25.065+0200; DEBUG; hostname123; P4216/T31; [Component]; &lt;span style="background-color: rgb(241, 252, 141);"&gt;Conversation state changed&lt;/span&gt;: ACTIVE -&amp;gt; ACTIVE. Call leg state changed: CallLegStateChange[ACTIVE-&amp;gt;ACTIVE for callLeg: CallLeg [&lt;a href="mailto:2c8a32f9066d396540b7024414c86fe8@1.2.3.4"&gt;2c8a32f9066d396540b7024414c86fe8@1.2.3.4&lt;/a&gt; -- D-638b5c9f-b60e-4d55-9544-cdbc51b5cd06] state: ActiveState@4b9f5055, status=UnknownStatus@2fb72ab2, additionalData=null];&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font face="Arial"&gt;And I'd like to parse this with:&lt;/font&gt;&lt;br/&gt;&lt;font face="Courier New"&gt;%d{yyyy-MM-ddT%H:mm:ss.fffzzzz}; %p; %c; %t; [%S{Component}]; %S{Action}: %m%n&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font face="Arial"&gt;Where I'd want the Action field to be "&lt;/font&gt;&lt;font face="Courier New"&gt;Conversation state changed&lt;/font&gt;&lt;font face="Arial"&gt;"&lt;br/&gt;&lt;br/&gt;I can't really seem to make this work with a Pattern Parser.&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;&amp;nbsp; Zoltan&lt;/font&gt;</description><pubDate>Thu, 26 May 2022 13:31:53 GMT</pubDate><dc:creator>keli</dc:creator></item><item><title>RE: Non-greedy string specifier in the Pattern parser?</title><link>https://www.logviewplus.com/forum/post/1477</link><description>No worries Zoltan - glad that helped.&amp;nbsp; :-)</description><pubDate>Thu, 26 May 2022 13:31:53 GMT</pubDate><dc:creator>LogViewPlus Support</dc:creator></item><item><title>RE: Non-greedy string specifier in the Pattern parser?</title><link>https://www.logviewplus.com/forum/post/1476</link><description>Oh, burn :D &lt;br/&gt;I was hoping I can come up with a simple example, but haven't tested it myself. :D&lt;br/&gt;You are perfectly right, and my problem was that I was already using a multi-parser, and a different pattern line matched in my real-life scenario, rather than which I was expecting to match.&lt;br/&gt;&lt;br/&gt;Sorry for the confusion created.&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 26 May 2022 13:28:21 GMT</pubDate><dc:creator>keli</dc:creator></item><item><title>RE: Non-greedy string specifier in the Pattern parser?</title><link>https://www.logviewplus.com/forum/post/1472</link><description>Hi Zoltan,&lt;br/&gt;&lt;br/&gt;The example provided seems to work as you would expect:&lt;br/&gt;&lt;img src="../Uploads/Images/2a089d65-99dd-4d96-8d91-272c.png" id="if_insertedNode_1653493794581"&gt;&lt;br/&gt;&lt;br/&gt;It is not clear what you are trying to achieve, but I suspect the problem you are having may be related to the other log entries in the file.&amp;nbsp; LogViewPlus does not support parsers with optional arguments, but you may want to experiment with &lt;a href="https://www.logviewplus.com/docs/multi_patterns.html" id="if_insertedNode_1653493916142"&gt;multi-patterns&lt;/a&gt;.&amp;nbsp; These allow you to apply multiple parsers to the same log file.&lt;br/&gt;&lt;br/&gt;Hope that helps,&lt;br/&gt;&lt;br/&gt;Toby</description><pubDate>Wed, 25 May 2022 15:52:50 GMT</pubDate><dc:creator>LogViewPlus Support</dc:creator></item></channel></rss>