<?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: Extract New Fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575562#M200559</link>
    <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;Why is not showing this when checking the regex, but instead is showing me some mambo jumbo?&lt;/P&gt;&lt;P&gt;Also, how do i add "Log Started" to this&amp;nbsp;(?P&amp;lt;LogClosed&amp;gt;Log Closed).&lt;/P&gt;&lt;P&gt;I tried something like this&amp;nbsp;(?P&amp;lt;Log&amp;gt;Log Started)|(Log Closed) but i get only the "Log Started".&lt;/P&gt;&lt;P&gt;What i want in the end is to make a pivot of time when "event" occurred and&amp;nbsp;&amp;nbsp;"Log Started" "Log Closed", and get a list of&amp;nbsp;"Log Started" "Log Closed" listed by time ... if it makes sense to you what i want to describe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So having 2 fields, one called&amp;nbsp;"Log Started" and the other&amp;nbsp;"Log Closed", i don't think is going to work. In my head i get a reference of windows logs where there are codes for various events. And that "code" have multiple numbers, but if i tell splunk what code should look for, works like a charm.&lt;/P&gt;&lt;P&gt;Anyway ... I hope i was clear enough to understand and i look forward for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 22:24:01 GMT</pubDate>
    <dc:creator>bogdan_nicolesc</dc:creator>
    <dc:date>2021-11-18T22:24:01Z</dc:date>
    <item>
      <title>Extract New Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575442#M200521</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying so hard to do a new field in Splunk, but i don't know where i do "wrongs".&lt;/P&gt;&lt;P&gt;I would like to extract "&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Log&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;Closed&lt;/SPAN&gt;" or just "Log" from event, but when i do, i get all kind of other results other than what i want.&lt;BR /&gt;&lt;BR /&gt;I tried with extract and require.&lt;BR /&gt;&lt;BR /&gt;On the extract end i get a mixed variety of results, most of them with no relation to what i look for.&lt;BR /&gt;&lt;BR /&gt;On the require end, when i select all correct lines, i cannot press Next button as it is grayed out. And i have no other clue what to do next.&lt;BR /&gt;&lt;BR /&gt;My question is: What path should i take to get "&lt;SPAN class=""&gt;Log&lt;/SPAN&gt; &lt;SPAN class=""&gt;Closed" or just "Log" from the event "&lt;SPAN class=""&gt;2021-11-18&lt;/SPAN&gt; &lt;SPAN class=""&gt;02:19:04.291&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;Thread:&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;Log&lt;/SPAN&gt; &lt;SPAN class=""&gt;Closed&lt;/SPAN&gt;" to make a new field. I would like to make a new Field as i have a "&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Log&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;Started" and a "Log Closed".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I tried even too look at the regex, but i understand none of it, exept i know that \n is new line.&lt;BR /&gt;&lt;BR /&gt;The regex is:&amp;nbsp;&lt;SPAN&gt;^[^&amp;gt;\n]*&amp;gt;\s+(?P&amp;lt;LogClosed&amp;gt;\w+\s+\w+)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 13:35:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575442#M200521</guid>
      <dc:creator>bogdan_nicolesc</dc:creator>
      <dc:date>2021-11-18T13:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extract New Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575447#M200524</link>
      <description>&lt;P&gt;Use regex101.com to test the regex - it gives you a breakdown of what the regex means&lt;/P&gt;&lt;P&gt;In your case, if you simply want a field called&amp;nbsp;&lt;SPAN&gt;LogClosed with the value "Log Closed" in and you are not interested in any other string, you could simply use this regex&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?P&amp;lt;LogClosed&amp;gt;Log Closed)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 18 Nov 2021 14:01:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575447#M200524</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-18T14:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Extract New Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575562#M200559</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;Why is not showing this when checking the regex, but instead is showing me some mambo jumbo?&lt;/P&gt;&lt;P&gt;Also, how do i add "Log Started" to this&amp;nbsp;(?P&amp;lt;LogClosed&amp;gt;Log Closed).&lt;/P&gt;&lt;P&gt;I tried something like this&amp;nbsp;(?P&amp;lt;Log&amp;gt;Log Started)|(Log Closed) but i get only the "Log Started".&lt;/P&gt;&lt;P&gt;What i want in the end is to make a pivot of time when "event" occurred and&amp;nbsp;&amp;nbsp;"Log Started" "Log Closed", and get a list of&amp;nbsp;"Log Started" "Log Closed" listed by time ... if it makes sense to you what i want to describe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So having 2 fields, one called&amp;nbsp;"Log Started" and the other&amp;nbsp;"Log Closed", i don't think is going to work. In my head i get a reference of windows logs where there are codes for various events. And that "code" have multiple numbers, but if i tell splunk what code should look for, works like a charm.&lt;/P&gt;&lt;P&gt;Anyway ... I hope i was clear enough to understand and i look forward for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 22:24:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575562#M200559</guid>
      <dc:creator>bogdan_nicolesc</dc:creator>
      <dc:date>2021-11-18T22:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extract New Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575592#M200572</link>
      <description>&lt;LI-CODE lang="markup"&gt;(?P&amp;lt;Log&amp;gt;Log (Started|Closed))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 19 Nov 2021 08:02:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575592#M200572</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-19T08:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract New Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575662#M200587</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where or how do you learn this stuff?&lt;BR /&gt;&lt;BR /&gt;I mean, i know there is info out there somewhere, but how do you put things together, or how do they say connect the dots.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm asking because even if i tried to use regex101.com, was not that obvious choise to use this form.&lt;BR /&gt;&lt;BR /&gt;Anyway ... Thank you so much.&lt;BR /&gt;&lt;BR /&gt;Where do i send beer? :))&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 15:33:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575662#M200587</guid>
      <dc:creator>bogdan_nicolesc</dc:creator>
      <dc:date>2021-11-19T15:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extract New Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575671#M200588</link>
      <description>&lt;P&gt;regex101.com is a great resource - trial and error goes a long way for learning this stuff - you can probably find other resources too,&amp;nbsp;&lt;A href="https://www.regular-expressions.info/" target="_blank"&gt;https://www.regular-expressions.info/&lt;/A&gt;&amp;nbsp;has a pretty comprehensive tutorial for example.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 15:51:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-New-Fields/m-p/575671#M200588</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-19T15:51:48Z</dc:date>
    </item>
  </channel>
</rss>

