<?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 remove everything after a specific character from a field in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-everything-after-a-specific-character-from-a-field/m-p/480874#M82439</link>
    <description>&lt;P&gt;Hi @Shashank_87,&lt;BR /&gt;
you can use the rex comman, something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index
| rex field=my_field "^(?&amp;lt;my_field&amp;gt;[^\&amp;amp;\?]*)"
| ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/f8lmIs/1"&gt;https://regex101.com/r/f8lmIs/1&lt;/A&gt; .&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 20 Apr 2020 14:16:40 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-04-20T14:16:40Z</dc:date>
    <item>
      <title>How to remove everything after a specific character from a field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-everything-after-a-specific-character-from-a-field/m-p/480873#M82438</link>
      <description>&lt;P&gt;Hi I want to remove everything after a some characters like ? OR &amp;amp; when they come in a field. For example -&lt;/P&gt;

&lt;P&gt;/temp/test?csrkyyt=12334&lt;/P&gt;

&lt;P&gt;/test1/test2&amp;amp;csrkyyt=7968676&lt;/P&gt;

&lt;P&gt;Can someone help?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 14:11:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-everything-after-a-specific-character-from-a-field/m-p/480873#M82438</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2020-04-20T14:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character from a field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-everything-after-a-specific-character-from-a-field/m-p/480874#M82439</link>
      <description>&lt;P&gt;Hi @Shashank_87,&lt;BR /&gt;
you can use the rex comman, something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index
| rex field=my_field "^(?&amp;lt;my_field&amp;gt;[^\&amp;amp;\?]*)"
| ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/f8lmIs/1"&gt;https://regex101.com/r/f8lmIs/1&lt;/A&gt; .&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 14:16:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-everything-after-a-specific-character-from-a-field/m-p/480874#M82439</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-04-20T14:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character from a field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-everything-after-a-specific-character-from-a-field/m-p/480875#M82440</link>
      <description>&lt;P&gt;You can use rex with sed to remove all characters after &lt;CODE&gt;?&lt;/CODE&gt; &lt;STRONG&gt;OR&lt;/STRONG&gt;  &lt;CODE&gt;&amp;amp;&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex mode=sed field=FIELD_NAME "s/[&amp;amp;?].*//g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Apr 2020 14:24:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-everything-after-a-specific-character-from-a-field/m-p/480875#M82440</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-04-20T14:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character from a field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-everything-after-a-specific-character-from-a-field/m-p/480876#M82441</link>
      <description>&lt;P&gt;Hi @Shashank_87&lt;/P&gt;

&lt;P&gt;Check this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval text="/temp/test?csrkyyt=12334##/test1/test2&amp;amp;csrkyyt=7968676" 
| makemv delim="##" text 
| mvexpand text 
| rex field=text "(?P&amp;lt;output&amp;gt;^[^(?|&amp;amp;)]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Apr 2020 02:56:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-everything-after-a-specific-character-from-a-field/m-p/480876#M82441</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2020-04-21T02:56:42Z</dc:date>
    </item>
  </channel>
</rss>

