<?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 you retrieve names in comments using regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-retrieve-names-in-comments-using-regex/m-p/435273#M124130</link>
    <description>&lt;P&gt;Hi @ramesh12345&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval comments="2019-03-06 15:48:12 - one (5513241321) (Case Notes (Comments Visible)) case in progress" 
| rex field=comments "\s-\s(?P&amp;lt;name&amp;gt;[\w]*\s\(\w*\))"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Mar 2019 15:07:41 GMT</pubDate>
    <dc:creator>vnravikumar</dc:creator>
    <dc:date>2019-03-08T15:07:41Z</dc:date>
    <item>
      <title>How do you retrieve names in comments using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-retrieve-names-in-comments-using-regex/m-p/435272#M124129</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="os" sourcetype="test"  CaseNumber=*| dedup _time,CaseNumber  | rex field=Notes "(?\d+-\d+-\d+\s*\d+:\d+:\d+)\s*\-\s*(?\w*\W*\w*\s*\w*\s*\(\d+\))\s*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above query displays the lastupdated user. But I want to display all names from the comments&lt;/P&gt;

&lt;P&gt;EX:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2019-03-07 11:48:12 - one (1234513241) (Case Notes (Comments Visible )) data in not loading
2019-03-07 12:48:12 - two (2345132421) (Case Notes (Comments Visible)) error occured
2019-03-06 14:48:12 - three (3451324143) (Case Notes (Comments Visible)) testing
2019-03-06 15:48:12 - one (5513241321) (Case Notes (Comments Visible)) case in progress
2019-03-06 17:48:12 - four (2416575443) (Case Notes (Comments Visible)) filter option
2019-03-06 18:48:12 - five (4154678765) (Case Notes (Comments Visible)) data loading
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is for one case. After date is names of the persons. So I want to display all names who commented  for that case.&lt;/P&gt;

&lt;P&gt;Ex:Casenumber is 1111&lt;/P&gt;

&lt;P&gt;1111 one (1234513241) two (2345132421) three (3451324143) four (2416575443) five (4154678765)  like this&lt;/P&gt;

&lt;P&gt;How do I write the regular expression to do this?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 14:43:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-retrieve-names-in-comments-using-regex/m-p/435272#M124129</guid>
      <dc:creator>ramesh12345</dc:creator>
      <dc:date>2019-03-08T14:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do you retrieve names in comments using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-retrieve-names-in-comments-using-regex/m-p/435273#M124130</link>
      <description>&lt;P&gt;Hi @ramesh12345&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval comments="2019-03-06 15:48:12 - one (5513241321) (Case Notes (Comments Visible)) case in progress" 
| rex field=comments "\s-\s(?P&amp;lt;name&amp;gt;[\w]*\s\(\w*\))"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Mar 2019 15:07:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-retrieve-names-in-comments-using-regex/m-p/435273#M124130</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-03-08T15:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do you retrieve names in comments using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-retrieve-names-in-comments-using-regex/m-p/435274#M124131</link>
      <description>&lt;P&gt;@ramesh12345 ,&lt;/P&gt;

&lt;P&gt;Based on your sample data , try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"your search"
| rex "-\s(?&amp;lt;Names&amp;gt;\w+\s\(\d+\))"
| stats values(Names) as Names by Casenumber 
| nomv Names 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Mar 2019 15:25:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-retrieve-names-in-comments-using-regex/m-p/435274#M124131</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-03-08T15:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do you retrieve names in comments using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-retrieve-names-in-comments-using-regex/m-p/435275#M124132</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
With you query i am getting names who worked on that particular case.But My requirement is to display single person completed cases.&lt;BR /&gt;
Ex: Case:1 name: raju&lt;BR /&gt;
      Case:2 name:raju,ramu,rakesh&lt;BR /&gt;
      Case:3 name:ramu,rakesh,rahul,raju&lt;/P&gt;

&lt;P&gt;so the requirement is single peron completed cases.&lt;/P&gt;

&lt;P&gt;Here raju only worked on one case.so raju count is 1&lt;/P&gt;

&lt;P&gt;In multiple cases he involved: raju count is 2&lt;/P&gt;

&lt;P&gt;index="os" sourcetype="Service"  CaseNumber=* status=*  assignment=* |dedup _time,CaseNumber,assignment|streamstats current=f last(assignment) as lg, last(active) as  Active by CaseNumber|lookup L1Team.csv SSO as assigned_to OUTPUT TeamName| eval is_escalated= if(assignment!=lg AND assignment_group="Sustaining",1,NULL) |eval is_resolved=if(assignment="Sustaining" AND status="Complete" AND (isnull(Active) OR Active="true"),1,NULL)|stats count(is_escalated) AS "Escalated Cases" count(is_resolved) AS "Resolved Cases"  by assigned_to,TeamName| fields - TeamName&lt;/P&gt;

&lt;P&gt;with this query iam getting only who closed this case.that number is assigned to that case.&lt;BR /&gt;
i want to display like above what i explained.Please help how to do this&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:36:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-retrieve-names-in-comments-using-regex/m-p/435275#M124132</guid>
      <dc:creator>ramesh12345</dc:creator>
      <dc:date>2020-09-29T23:36:25Z</dc:date>
    </item>
  </channel>
</rss>

