<?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: Covert Object name into column name using back slash in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441387#M11892</link>
    <description>&lt;P&gt;Try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=... | where ... | stats ... | sort ...
| rex field=Object_Name "^(?&amp;lt;A&amp;gt;[^\\\\]+)\\\\(?&amp;lt;B&amp;gt;[^\\\\]+)\\\\(?&amp;lt;C&amp;gt;[^\\\\]+)\\\\(?&amp;lt;D&amp;gt;[^\\\\]+)\\\\(?&amp;lt;E&amp;gt;[^\\\\]+)\\\\(?&amp;lt;F&amp;gt;[^\\\\]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(The makeresults and eval line were just for testing purposes.)&lt;/P&gt;

&lt;P&gt;I changed "rex field=Object_name" to "rex field=Object_Name". Field names are case sensitive.&lt;/P&gt;

&lt;P&gt;If this does not work, could you post a screenshot of the results from this query? (Specifically of the Object_Name column.)&lt;/P&gt;

&lt;P&gt;You can use &lt;A href="https://regex101.com/" target="_blank"&gt;regex101.com&lt;/A&gt; for testing regular expressions.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 22:32:26 GMT</pubDate>
    <dc:creator>whrg</dc:creator>
    <dc:date>2020-09-29T22:32:26Z</dc:date>
    <item>
      <title>Covert Object name into column name using back slash</title>
      <link>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441382#M11887</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;

&lt;P&gt;Could anyone can help me in spiting Object name into column name&lt;/P&gt;

&lt;P&gt;Like In Query we are getting Object name as in One Column :&lt;/P&gt;

&lt;P&gt;R:\ClientReports\OpenCaseReport\DataFiles\AmeriHealth_Open\CaseReport_20101210.txt&lt;/P&gt;

&lt;P&gt;I wanted to spit into 6 column as A ,B,C,D,E,F&lt;/P&gt;

&lt;P&gt;Output will be like this &lt;/P&gt;

&lt;P&gt;Header table :    A |B|C|D|E|F&lt;BR /&gt;
Row Data       :    R: |ClientReports|OpenCaseReport|DataFiles|AmeriHealthOpen|CaseReportt_20101210.txt&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:26:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441382#M11887</guid>
      <dc:creator>shishirkumar</dc:creator>
      <dc:date>2020-09-29T22:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Covert Object name into column name using back slash</title>
      <link>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441383#M11888</link>
      <description>&lt;P&gt;Hello @shishirkumar,&lt;/P&gt;

&lt;P&gt;Check out the &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex"&gt;rex&lt;/A&gt; command. You can use it to extract new fields from existing fields at search time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1 | eval Object_name="R:\ClientReports\OpenCaseReport\DataFiles\AmeriHealth_Open\CaseReport_20101210.txt"
| rex field=Object_name "^(?&amp;lt;A&amp;gt;[^\\\\]+)\\\\(?&amp;lt;B&amp;gt;[^\\\\]+)\\\\(?&amp;lt;C&amp;gt;[^\\\\]+)\\\\(?&amp;lt;D&amp;gt;[^\\\\]+)\\\\(?&amp;lt;E&amp;gt;[^\\\\]+)\\\\(?&amp;lt;F&amp;gt;[^\\\\]+)"
| table A,B,C,D,E,F
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will give you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;A    B               C                D           E                  F
R:   ClientReports   OpenCaseReport   DataFiles   AmeriHealth_Open   CaseReport_20101210.txt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could also save this regular expression as a field extraction so that it extracts the fields automatically.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 21:12:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441383#M11888</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2018-12-19T21:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Covert Object name into column name using back slash</title>
      <link>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441384#M11889</link>
      <description>&lt;P&gt;it not working if i am remove hardcoded value that is "R:\ClientReports\OpenCaseReport\DataFiles\AmeriHealth_Open\CaseReport_20101210.txt" with my column name ?&lt;/P&gt;

&lt;P&gt;Could You please help to resolve that.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441384#M11889</guid>
      <dc:creator>shishirkumar</dc:creator>
      <dc:date>2020-09-29T22:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Covert Object name into column name using back slash</title>
      <link>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441385#M11890</link>
      <description>&lt;P&gt;What is the name of the column?&lt;BR /&gt;
Did you set "| rex field=YOUR_COLUMN_NAME ..." accordingly?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:32:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441385#M11890</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2020-09-29T22:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Covert Object name into column name using back slash</title>
      <link>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441386#M11891</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; | makeresults count=1 | eval Object_name=Object_name
 | rex field=Object_name "^(?&amp;lt;A&amp;gt;[^\\\\]+)\\\\(?&amp;lt;B&amp;gt;[^\\\\]+)\\\\(?&amp;lt;C&amp;gt;[^\\\\]+)\\\\(?&amp;lt;D&amp;gt;[^\\\\]+)\\\\(?&amp;lt;E&amp;gt;[^\\\\]+)\\\\(?&amp;lt;F&amp;gt;[^\\\\]+)"
 | table A,B,C,D,E,F
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Object Name is column name &lt;/P&gt;

&lt;P&gt;This is Original Query where I wanted to add this.&lt;/P&gt;

&lt;P&gt;index=wineventlog host=ATLINFS3 sourcetype="WinEventLog:Security"  ClientReports NOT "&lt;EM&gt;Symantec Endpoint Protection&lt;/EM&gt;" Object_Name = "&lt;EM&gt;.PDF" OR Object_Name = "&lt;/EM&gt;.XLSX" OR Object_Name = "&lt;EM&gt;.TXT" | where Account_Name!="svisadmin" and  Object_Name != "&lt;/EM&gt;~$$*" | stats count(Object_Name) as TotalCount by Object_Name  | sort -TotalCount&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:32:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441386#M11891</guid>
      <dc:creator>shishirkumar</dc:creator>
      <dc:date>2020-09-29T22:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Covert Object name into column name using back slash</title>
      <link>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441387#M11892</link>
      <description>&lt;P&gt;Try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=... | where ... | stats ... | sort ...
| rex field=Object_Name "^(?&amp;lt;A&amp;gt;[^\\\\]+)\\\\(?&amp;lt;B&amp;gt;[^\\\\]+)\\\\(?&amp;lt;C&amp;gt;[^\\\\]+)\\\\(?&amp;lt;D&amp;gt;[^\\\\]+)\\\\(?&amp;lt;E&amp;gt;[^\\\\]+)\\\\(?&amp;lt;F&amp;gt;[^\\\\]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(The makeresults and eval line were just for testing purposes.)&lt;/P&gt;

&lt;P&gt;I changed "rex field=Object_name" to "rex field=Object_Name". Field names are case sensitive.&lt;/P&gt;

&lt;P&gt;If this does not work, could you post a screenshot of the results from this query? (Specifically of the Object_Name column.)&lt;/P&gt;

&lt;P&gt;You can use &lt;A href="https://regex101.com/" target="_blank"&gt;regex101.com&lt;/A&gt; for testing regular expressions.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:32:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Covert-Object-name-into-column-name-using-back-slash/m-p/441387#M11892</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2020-09-29T22:32:26Z</dc:date>
    </item>
  </channel>
</rss>

