<?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 do I trim all characters starting from the first digit? in Security</title>
    <link>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412097#M13459</link>
    <description>&lt;P&gt;could not get it to work&lt;/P&gt;

&lt;P&gt;table clienthost | rex field=clienthost  "^(\D+)"&lt;/P&gt;</description>
    <pubDate>Tue, 27 Nov 2018 19:32:13 GMT</pubDate>
    <dc:creator>sshahmoon</dc:creator>
    <dc:date>2018-11-27T19:32:13Z</dc:date>
    <item>
      <title>How do I trim all characters starting from the first digit?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412093#M13455</link>
      <description>&lt;P&gt;I have a table and I want to trim the values for one field, such that all characters from the first digits onwards are removed&lt;BR /&gt;
for example:&lt;/P&gt;

&lt;P&gt;"dadmin01ldk"   will be trimmed to "dadmin"&lt;/P&gt;

&lt;P&gt;"rusl90" will be trimmed to "rusl",I have a table with a field.&lt;/P&gt;

&lt;P&gt;I want to trim all characters starting at the first digit. &lt;/P&gt;

&lt;P&gt;For example, "dadmin02yut" will be trimmed into "dadmin"&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 02:40:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412093#M13455</guid>
      <dc:creator>sshahmoon</dc:creator>
      <dc:date>2018-11-27T02:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I trim all characters starting from the first digit?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412094#M13456</link>
      <description>&lt;P&gt;Try this, which captures all non-digits from the start of the field (replace 'yourfield' with the actual fieldname from your table):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=yourfield "^(&amp;lt;yourfield&amp;gt;\D+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Nov 2018 12:39:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412094#M13456</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-11-27T12:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I trim all characters starting from the first digit?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412095#M13457</link>
      <description>&lt;P&gt;Try this regex-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=&amp;lt;yourfieldname&amp;gt; "^(?&amp;lt;String&amp;gt;[A-Za-z]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It will trim  and store result in String field&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 12:40:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412095#M13457</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-11-27T12:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I trim all characters starting from the first digit?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412096#M13458</link>
      <description>&lt;P&gt;could not get it to work&lt;/P&gt;

&lt;P&gt;table clienthost | rex field=clienthost  "^(\D+)"&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 19:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412096#M13458</guid>
      <dc:creator>sshahmoon</dc:creator>
      <dc:date>2018-11-27T19:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I trim all characters starting from the first digit?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412097#M13459</link>
      <description>&lt;P&gt;could not get it to work&lt;/P&gt;

&lt;P&gt;table clienthost | rex field=clienthost  "^(\D+)"&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 19:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412097#M13459</guid>
      <dc:creator>sshahmoon</dc:creator>
      <dc:date>2018-11-27T19:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I trim all characters starting from the first digit?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412098#M13460</link>
      <description>&lt;P&gt;this works!&lt;/P&gt;

&lt;P&gt;thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 19:33:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412098#M13460</guid>
      <dc:creator>sshahmoon</dc:creator>
      <dc:date>2018-11-27T19:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I trim all characters starting from the first digit?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412099#M13461</link>
      <description>&lt;P&gt;@sshahmoon, FYI, Above rex works too. However, &lt;STRONG&gt;?&lt;/STRONG&gt; is missing in that regex. Try this, &lt;BR /&gt;
&lt;CODE&gt;| rex field=yourfield "^(?&amp;lt;yourfield&amp;gt;\D+)"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sandeep&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 21:32:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412099#M13461</guid>
      <dc:creator>sandeeprachuri</dc:creator>
      <dc:date>2018-11-27T21:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I trim all characters starting from the first digit?</title>
      <link>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412100#M13462</link>
      <description>&lt;P&gt;Ah, yes, my bad. Thanks for the correction.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 22:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-do-I-trim-all-characters-starting-from-the-first-digit/m-p/412100#M13462</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-11-27T22:18:27Z</dc:date>
    </item>
  </channel>
</rss>

