<?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 extract text using regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580767#M202319</link>
    <description>&lt;P&gt;hi, i want to extracted the first word from each variable the index has a field called search_name which has these variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Risk - 24 Hour Risk Threshold Exceeded - Rule&lt;BR /&gt;Endpoint - machine with possible malware - fffff&lt;BR /&gt;Network - Possible SQL injection - Rule&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to perform a regex to extracted the first word out of each variable so the output would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;risk&lt;/P&gt;&lt;P&gt;endpoint&lt;/P&gt;&lt;P&gt;network&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks ^_^&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jan 2022 11:55:40 GMT</pubDate>
    <dc:creator>moayadalghamdi</dc:creator>
    <dc:date>2022-01-12T11:55:40Z</dc:date>
    <item>
      <title>extract text using regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580767#M202319</link>
      <description>&lt;P&gt;hi, i want to extracted the first word from each variable the index has a field called search_name which has these variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Risk - 24 Hour Risk Threshold Exceeded - Rule&lt;BR /&gt;Endpoint - machine with possible malware - fffff&lt;BR /&gt;Network - Possible SQL injection - Rule&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to perform a regex to extracted the first word out of each variable so the output would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;risk&lt;/P&gt;&lt;P&gt;endpoint&lt;/P&gt;&lt;P&gt;network&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks ^_^&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 11:55:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580767#M202319</guid>
      <dc:creator>moayadalghamdi</dc:creator>
      <dc:date>2022-01-12T11:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: extract text using regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580768#M202320</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230148"&gt;@moayadalghamdi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this regex&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "^(?&amp;lt;your_field&amp;gt;\w+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/vKZmWL/1" target="_blank"&gt;https://regex101.com/r/vKZmWL/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 12:21:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580768#M202320</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-01-12T12:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: extract text using regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580774#M202324</link>
      <description>&lt;P&gt;And as you want those with lower cases then add this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw ="Risk - 24 Hour Risk Threshold Exceeded - Rule
Endpoint - machine with possible malware - fffff
Network - Possible SQL injection - Rule"
| multikv noheader=t 
``` Above create test data ```
| rex "^(?&amp;lt;result&amp;gt;\w+)"
| eval res = lower(result)
| table res result _raw&lt;/LI-CODE&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 13:15:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580774#M202324</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-01-12T13:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: extract text using regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580776#M202326</link>
      <description>&lt;P&gt;you're really a legend, thanks mate splunker ^_^&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 13:20:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580776#M202326</guid>
      <dc:creator>moayadalghamdi</dc:creator>
      <dc:date>2022-01-12T13:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: extract text using regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580779#M202327</link>
      <description>&lt;P&gt;thanks for the answer ^_^&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 13:22:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/extract-text-using-regex/m-p/580779#M202327</guid>
      <dc:creator>moayadalghamdi</dc:creator>
      <dc:date>2022-01-12T13:22:03Z</dc:date>
    </item>
  </channel>
</rss>

