<?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: How to extract 50A720 or 816851using | rex field=name  mode=sed &amp;quot;s/816851/&amp;quot;? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600925#M209172</link>
    <description>&lt;P&gt;There seems to be some confusion with what you are trying to do. Are you trying to extract the first part of the field (before the first - sign) into another field, or are you trying to edit the field to remove the first part and do you want to do this only if it is specifically either&amp;nbsp;50A720 or 816851?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=name "^(?&amp;lt;firstpart&amp;gt;[^\-]+)\-"

| rex field=name mode=sed "s/(50A720|816851)//g"&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 07 Jun 2022 18:06:42 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-06-07T18:06:42Z</dc:date>
    <item>
      <title>How to extract 50A720 or 816851using | rex field=name  mode=sed "s/816851/"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600920#M209171</link>
      <description>&lt;P&gt;The data i have is&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;816851-567-7554080981706881 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;50A720 -123-8150015922249983 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;816851-567-1135131573613120&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;816851-567-0065137870504409&lt;BR /&gt;50A720 -123-1135131573613120&lt;BR /&gt;816851-567-0065137870504409&lt;BR /&gt;50A720 -123-1135131573613120&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;50A720 -123&lt;/SPAN&gt;-0065137870504409&lt;BR /&gt;&lt;BR /&gt;I want to extract&amp;nbsp;&lt;SPAN&gt;50A720 or 816851using&amp;nbsp;| rex field=name&amp;nbsp;&amp;nbsp;mode=sed "s/816851/"&lt;BR /&gt;getting error&amp;nbsp;Error in 'rex' command: Failed to initialize sed. Failed to parse the replacement string.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 17:40:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600920#M209171</guid>
      <dc:creator>ashidhingra</dc:creator>
      <dc:date>2022-06-07T17:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract 50A720 or 816851using | rex field=name  mode=sed "s/816851/"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600925#M209172</link>
      <description>&lt;P&gt;There seems to be some confusion with what you are trying to do. Are you trying to extract the first part of the field (before the first - sign) into another field, or are you trying to edit the field to remove the first part and do you want to do this only if it is specifically either&amp;nbsp;50A720 or 816851?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=name "^(?&amp;lt;firstpart&amp;gt;[^\-]+)\-"

| rex field=name mode=sed "s/(50A720|816851)//g"&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Jun 2022 18:06:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600925#M209172</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-07T18:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract 50A720 or 816851using | rex field=name  mode=sed "s/816851/"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600930#M209175</link>
      <description>&lt;P&gt;I only want to see 50A720 or 816851 in the ouput&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 18:14:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600930#M209175</guid>
      <dc:creator>ashidhingra</dc:creator>
      <dc:date>2022-06-07T18:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract 50A720 or 816851using | rex field=name  mode=sed "s/816851/"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600932#M209176</link>
      <description>&lt;P&gt;If you want to do it with rex (although there are probably easier ways to do it), you could try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=name mode=sed "s/(50A720|816851)(.*)/\1/g"&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Jun 2022 18:27:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600932#M209176</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-07T18:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract 50A720 or 816851using | rex field=name  mode=sed "s/816851/"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600933#M209177</link>
      <description>&lt;P class="lia-align-left"&gt;Awesome. thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 18:30:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-50A720-or-816851using-rex-field-name-mode-sed/m-p/600933#M209177</guid>
      <dc:creator>ashidhingra</dc:creator>
      <dc:date>2022-06-07T18:30:55Z</dc:date>
    </item>
  </channel>
</rss>

