<?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: Rex need to extract field till first occurrence of /r in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Rex-need-to-extract-field-till-first-occurrence-of-r/m-p/552377#M156781</link>
    <description>&lt;P&gt;Try three backslashes as splunk seems to need more than regex101&lt;/P&gt;</description>
    <pubDate>Thu, 20 May 2021 11:46:09 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-05-20T11:46:09Z</dc:date>
    <item>
      <title>Rex need to extract field till first occurrence of /r</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-need-to-extract-field-till-first-occurrence-of-r/m-p/552372#M156779</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need to extract hostname or IP address from raw log.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My log looks like below:&lt;/P&gt;&lt;P&gt;somerandometest&amp;nbsp; host: &lt;A href="mailto:abc@email.com" target="_blank"&gt;abc@email.com&lt;/A&gt;&amp;nbsp;\r\n someothertext&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote rex as "Host:.(?&amp;lt;Host&amp;gt;.*?)(\\r)"&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this works great in regex site, but when I put it in splunk search it does not work. Please let me know if anything need to be updated.&amp;nbsp; I'm extracting text between host to till \r.&lt;/P&gt;&lt;P&gt;here extracted field can be hostname or IP address hence taking till "\r"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 11:21:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-need-to-extract-field-till-first-occurrence-of-r/m-p/552372#M156779</guid>
      <dc:creator>Sangu</dc:creator>
      <dc:date>2021-05-20T11:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Rex need to extract field till first occurrence of /r</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-need-to-extract-field-till-first-occurrence-of-r/m-p/552377#M156781</link>
      <description>&lt;P&gt;Try three backslashes as splunk seems to need more than regex101&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 11:46:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-need-to-extract-field-till-first-occurrence-of-r/m-p/552377#M156781</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-20T11:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Rex need to extract field till first occurrence of /r</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-need-to-extract-field-till-first-occurrence-of-r/m-p/552382#M156783</link>
      <description>&lt;P&gt;Thanks for the help, It worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 11:56:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-need-to-extract-field-till-first-occurrence-of-r/m-p/552382#M156783</guid>
      <dc:creator>Sangu</dc:creator>
      <dc:date>2021-05-20T11:56:28Z</dc:date>
    </item>
  </channel>
</rss>

