<?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 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-using-regex/m-p/621808#M216150</link>
    <description>&lt;P&gt;It quite depends on how stable is the actual data format. &amp;nbsp;If all values have no comma in them as illustrated, you can simply do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "(?&amp;lt;DateTime&amp;gt;[^,]+, *(?&amp;lt;username&amp;gt;[^,]+), *(?&amp;lt;Action&amp;gt;[^,]+), *(?&amp;lt;Entity&amp;gt;[^,]+)"&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 23 Nov 2022 07:53:49 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2022-11-23T07:53:49Z</dc:date>
    <item>
      <title>How do I extract using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-using-regex/m-p/621799#M216146</link>
      <description>&lt;P&gt;i have below result, how can I do a regex to extract the fields, first being DateTime, username, Action, Entity&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;2022-11&lt;/SPAN&gt;-&lt;SPAN class=""&gt;21&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;15:44:13&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;ea186520&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;CREATED&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;USERSESSIONLOG&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 14:03:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-using-regex/m-p/621799#M216146</guid>
      <dc:creator>sphiwee</dc:creator>
      <dc:date>2022-11-23T14:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-using-regex/m-p/621808#M216150</link>
      <description>&lt;P&gt;It quite depends on how stable is the actual data format. &amp;nbsp;If all values have no comma in them as illustrated, you can simply do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "(?&amp;lt;DateTime&amp;gt;[^,]+, *(?&amp;lt;username&amp;gt;[^,]+), *(?&amp;lt;Action&amp;gt;[^,]+), *(?&amp;lt;Entity&amp;gt;[^,]+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Nov 2022 07:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-using-regex/m-p/621808#M216150</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-11-23T07:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-using-regex/m-p/621809#M216151</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/223364"&gt;@sphiwee&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you can use the Field User Extractor to extract these fields without using regexes, cebause they are comma separated fields.&lt;/P&gt;&lt;P&gt;If you want to use a regex, you can use this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "^(?&amp;lt;DateTime&amp;gt;[^,]*),(?&amp;lt;username&amp;gt;[^,]*),(?&amp;lt;Action&amp;gt;[^,]*),(?&amp;lt;Entity&amp;gt;[^,]*)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/KMPkSa/1" target="_blank"&gt;https://regex101.com/r/KMPkSa/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 07:55:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-extract-using-regex/m-p/621809#M216151</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-23T07:55:07Z</dc:date>
    </item>
  </channel>
</rss>

