<?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: Adding Characters to the beginning of a field only when field starts with &amp;quot;\&amp;quot; in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303852#M175535</link>
    <description>&lt;P&gt;can you provide the search you are using now?&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2017 19:22:03 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2017-02-15T19:22:03Z</dc:date>
    <item>
      <title>Adding Characters to the beginning of a field only when field starts with "\"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303845#M175528</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have a search that returns a field called "Administrators"&lt;/P&gt;

&lt;P&gt;Administrators&lt;/P&gt;

&lt;P&gt;\DomainAdmins&lt;BR /&gt;
\Backup Group&lt;BR /&gt;
\Eventlog Administrators&lt;BR /&gt;
user1&lt;BR /&gt;
user2&lt;/P&gt;

&lt;P&gt;for every entry that has a \ at the beginning I would like to put the word "Domain"&lt;/P&gt;

&lt;P&gt;Domain\DomainAdmins&lt;BR /&gt;
Domain\Backup Group&lt;BR /&gt;
Domain\Eventlog Administrators&lt;BR /&gt;
user1&lt;BR /&gt;
user2&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 21:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303845#M175528</guid>
      <dc:creator>ajdyer2000</dc:creator>
      <dc:date>2017-02-14T21:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Characters to the beginning of a field only when field starts with "\"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303846#M175529</link>
      <description>&lt;P&gt;This should work for you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;*|eval administrators=if(match(administrators, "^\\\.+"), "Domain".administrators, administrators)|table administrators
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Feb 2017 22:02:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303846#M175529</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2017-02-14T22:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Characters to the beginning of a field only when field starts with "\"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303847#M175530</link>
      <description>&lt;P&gt;Probably want to put a carat ^ at the start of that, so it only matches at the beginning of the string. &lt;/P&gt;

&lt;P&gt;"Match" returns true if the REGEX can find a match against any substring of SUBJECT.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 22:07:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303847#M175530</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-14T22:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Characters to the beginning of a field only when field starts with "\"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303848#M175531</link>
      <description>&lt;P&gt;I get no results found with that&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 22:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303848#M175531</guid>
      <dc:creator>ajdyer2000</dc:creator>
      <dc:date>2017-02-14T22:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Characters to the beginning of a field only when field starts with "\"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303849#M175532</link>
      <description>&lt;P&gt;good point. edited.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 22:09:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303849#M175532</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2017-02-14T22:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Characters to the beginning of a field only when field starts with "\"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303850#M175533</link>
      <description>&lt;P&gt;whats your starting search?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 22:13:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303850#M175533</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2017-02-14T22:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Characters to the beginning of a field only when field starts with "\"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303851#M175534</link>
      <description>&lt;P&gt;Hi what would the new search look like?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 19:16:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303851#M175534</guid>
      <dc:creator>ajdyer2000</dc:creator>
      <dc:date>2017-02-15T19:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Characters to the beginning of a field only when field starts with "\"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303852#M175535</link>
      <description>&lt;P&gt;can you provide the search you are using now?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 19:22:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303852#M175535</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2017-02-15T19:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Characters to the beginning of a field only when field starts with "\"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303853#M175536</link>
      <description>&lt;P&gt;In @nickhillscpl's answer, replace first &lt;CODE&gt;*&lt;/CODE&gt;  with whatever search you've right now. Just add that &lt;CODE&gt;| eval administrator...&lt;/CODE&gt; to end of your search.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 19:22:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-Characters-to-the-beginning-of-a-field-only-when-field/m-p/303853#M175536</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-15T19:22:38Z</dc:date>
    </item>
  </channel>
</rss>

