<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Regex help involving double quote in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350960#M103894</link>
    <description>&lt;P&gt;None of them worked.  They either error for unbalanced quotes or they list the field name under Interesting Fields but with a blank value. &lt;/P&gt;</description>
    <pubDate>Mon, 12 Jun 2017 15:24:12 GMT</pubDate>
    <dc:creator>kmaron</dc:creator>
    <dc:date>2017-06-12T15:24:12Z</dc:date>
    <item>
      <title>Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350953#M103887</link>
      <description>&lt;P&gt;I have a whole bunch of these and I need what comes after  ?desktop=  and before the "&lt;BR /&gt;&lt;BR /&gt;
- for this particular log I need &lt;STRONG&gt;UnderwritingICM&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10.181.8.169 - E009239 [12/Jun/2017:10:41:53 -0400] "POST /navigator/jaxrs/plugin?repositoryId=UNDERWRITINGTARGETOS&amp;amp;caseId=70C09C5C-0100-C614-92F3-BEEC330CE13F&amp;amp;plugin=ICMAPIPlugin&amp;amp;action=CaseService&amp;amp;desktop=UnderwritingICM HTTP/1.1" 200 33444 "https://www.aoins.com/navigator/?desktop=UnderwritingICM" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" 112093 2848 33869 48 + 10.7.44.250 PRDFNCM102.aoins.com:15108 -
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However I can't seem to get that piece.  I either get nothing or I get everything. I can't seem to get the regex to stop at the double quote. &lt;/P&gt;

&lt;P&gt;When I put my regex into regex101 to test it this works&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\?desktop=(?&amp;lt;DesktopName&amp;gt;.*?)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but when I try to use that in Splunk I get unbalanced quotes&lt;/P&gt;

&lt;P&gt;I tried a single slash to escape the quote and it comes back with nothing&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "\?desktop=(?&amp;lt;DesktopName&amp;gt;.*?)\""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried a double slash and it tells me I have unbalanced quotes&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "\?desktop=(?&amp;lt;DesktopName&amp;gt;.*?)\\""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And three gave me the same as one so ... I'm stumped. &lt;/P&gt;

&lt;P&gt;Can anyone help with this?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 14:50:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350953#M103887</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-06-12T14:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350954#M103888</link>
      <description>&lt;P&gt;I would use this instead. &lt;BR /&gt;
\?desktop=(?\S+?)"&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 14:57:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350954#M103888</guid>
      <dc:creator>gauravsplunkarc</dc:creator>
      <dc:date>2017-06-12T14:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350955#M103889</link>
      <description>&lt;P&gt;.* is greedy. use \S+ instead.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 14:58:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350955#M103889</guid>
      <dc:creator>gauravsplunkarc</dc:creator>
      <dc:date>2017-06-12T14:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350956#M103890</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "\?desktop=(?&amp;lt;DesktopName&amp;gt;\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Jun 2017 15:01:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350956#M103890</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-06-12T15:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350957#M103891</link>
      <description>&lt;P&gt;Seems to work ok here.&lt;/P&gt;

&lt;P&gt;If I try that with &lt;CODE&gt;?desktop=UnderwritingICM"&lt;/CODE&gt; in an eval and using your first rex on that field, it works just fine. &lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 15:07:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350957#M103891</guid>
      <dc:creator>mattiaslindblom</dc:creator>
      <dc:date>2017-06-12T15:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350958#M103892</link>
      <description>&lt;P&gt;I knew it was going to be something simple.  Thank you!!!!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 15:08:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350958#M103892</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-06-12T15:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350959#M103893</link>
      <description>&lt;P&gt;To me, your first rex looks fine, though, and should work.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 15:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350959#M103893</guid>
      <dc:creator>mattiaslindblom</dc:creator>
      <dc:date>2017-06-12T15:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350960#M103894</link>
      <description>&lt;P&gt;None of them worked.  They either error for unbalanced quotes or they list the field name under Interesting Fields but with a blank value. &lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 15:24:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350960#M103894</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-06-12T15:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350961#M103895</link>
      <description>&lt;P&gt;That gives me unbalanced quotes&lt;/P&gt;

&lt;P&gt;| rex field=_raw "\?desktop=(?\S+?)"" &lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 16:32:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350961#M103895</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-06-12T16:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350962#M103896</link>
      <description>&lt;P&gt;index=index host="host" | rex field=_raw "\?desktop=(?.*?)"" &lt;/P&gt;

&lt;P&gt;This gives me unbalanced quotes&lt;/P&gt;

&lt;P&gt;index=index host="host" | rex field=_raw "\?desktop=(?.*?)" &lt;/P&gt;

&lt;P&gt;This gives me the field name of DesktopName  but the 'value' is blank&lt;BR /&gt;
1 Value, 75.064% of events&lt;/P&gt;

&lt;P&gt;Reports&lt;BR /&gt;
Top values  Top values by time  Rare values&lt;BR /&gt;
Events with this field&lt;BR /&gt;
Values  Count   %&lt;BR /&gt;&lt;BR /&gt;
               19,413   100%&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 16:35:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350962#M103896</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-06-12T16:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350963#M103897</link>
      <description>&lt;P&gt;formatting went bad.. I meant&lt;BR /&gt;
 | rex field=_raw "\?desktop=(?\S+)"&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 17:44:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350963#M103897</guid>
      <dc:creator>GauravSplunxter</dc:creator>
      <dc:date>2017-06-12T17:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350964#M103898</link>
      <description>&lt;P&gt;it's happening again.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 17:44:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350964#M103898</guid>
      <dc:creator>GauravSplunxter</dc:creator>
      <dc:date>2017-06-12T17:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350965#M103899</link>
      <description>&lt;P&gt;I downvoted this post because the command is not showing up properly on the page after i click submit.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 17:45:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350965#M103899</guid>
      <dc:creator>GauravSplunxter</dc:creator>
      <dc:date>2017-06-12T17:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help involving double quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350966#M103900</link>
      <description>&lt;P&gt;does it work if you post it as code?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 17:46:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-involving-double-quote/m-p/350966#M103900</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-06-12T17:46:55Z</dc:date>
    </item>
  </channel>
</rss>

