<?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 Help with regex to remove first part of string? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-remove-first-part-of-string/m-p/614716#M213641</link>
    <description>&lt;P&gt;I have 2 fields: the values of fieldA are present in fieldB and I need to remove the first part of fieldB up to the values present in fieldA.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;fieldA = BP498&lt;/P&gt;
&lt;P&gt;fieldB = "A1John/Doe SmithBP498 XX XX XX"&lt;/P&gt;
&lt;P&gt;Desired:&lt;/P&gt;
&lt;P&gt;fieldB="BP498 XX XX XX"&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2022 14:16:22 GMT</pubDate>
    <dc:creator>tomapatan</dc:creator>
    <dc:date>2022-09-27T14:16:22Z</dc:date>
    <item>
      <title>Help with regex to remove first part of string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-remove-first-part-of-string/m-p/614716#M213641</link>
      <description>&lt;P&gt;I have 2 fields: the values of fieldA are present in fieldB and I need to remove the first part of fieldB up to the values present in fieldA.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;fieldA = BP498&lt;/P&gt;
&lt;P&gt;fieldB = "A1John/Doe SmithBP498 XX XX XX"&lt;/P&gt;
&lt;P&gt;Desired:&lt;/P&gt;
&lt;P&gt;fieldB="BP498 XX XX XX"&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 14:16:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-remove-first-part-of-string/m-p/614716#M213641</guid>
      <dc:creator>tomapatan</dc:creator>
      <dc:date>2022-09-27T14:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: regex to remove first part of string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-remove-first-part-of-string/m-p/614726#M213646</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249836"&gt;@tomapatan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH
| eval fieldB=fieldA+mvindex(split(fieldB,fieldA),1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval fieldA = "BP498",fieldB = "A1John/Doe SmithBP498 XX XX XX"
| rename comment as "upto this is sample data" 
| eval fieldB=fieldA+mvindex(split(fieldB,fieldA),1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-09-27 at 3.37.44 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21700i6DCCE88BD61DAD3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-09-27 at 3.37.44 PM.png" alt="Screenshot 2022-09-27 at 3.37.44 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I hope this will help you. &lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;If any of my replies help you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 10:08:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-remove-first-part-of-string/m-p/614726#M213646</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2022-09-27T10:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: regex to remove first part of string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-remove-first-part-of-string/m-p/614727#M213647</link>
      <description>&lt;P&gt;That's a cool way to remove something from a string! I'll add that to my repertoire, thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 10:15:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-remove-first-part-of-string/m-p/614727#M213647</guid>
      <dc:creator>FelixLeh</dc:creator>
      <dc:date>2022-09-27T10:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: regex to remove first part of string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-remove-first-part-of-string/m-p/614729#M213649</link>
      <description>&lt;P&gt;worked for me, much appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 10:28:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-to-remove-first-part-of-string/m-p/614729#M213649</guid>
      <dc:creator>tomapatan</dc:creator>
      <dc:date>2022-09-27T10:28:33Z</dc:date>
    </item>
  </channel>
</rss>

