<?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: subsearch query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/subsearch-query/m-p/159894#M45153</link>
    <description>&lt;P&gt;Try adding following to end of your search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your current search | eval HasLastNameInEmail=if(like(user_name,"%".p_last."%"),"Yes","No")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Dec 2014 16:14:58 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-12-16T16:14:58Z</dc:date>
    <item>
      <title>subsearch query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-query/m-p/159893#M45152</link>
      <description>&lt;P&gt;I have the following query that works fine.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=pdv OrgId=* | rex field=request_id "SearchString=(?[^\d].*?)\|.*$" | search PatientName=* | rex field=PatientName "(?.*?)[ ,](?.*)" | rex field=client_id "UserId=(?\d+)" | lookup company_administration-user user_id OUTPUT user_name first_name AS u_first last_name AS u_last | table _time OrgId user_name u_first u_last p_first p_last
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to add a subsearch that looks for all occurrences where p_last is within user_name.  I don't know how to adjust the query to get this result - can anyone help please?  In other words - user_name is an email address and p_last is a users last name.  I want to know when a users last name is within the email address.&lt;/P&gt;

&lt;P&gt;thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:27:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-query/m-p/159893#M45152</guid>
      <dc:creator>brenisro</dc:creator>
      <dc:date>2020-09-28T18:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-query/m-p/159894#M45153</link>
      <description>&lt;P&gt;Try adding following to end of your search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your current search | eval HasLastNameInEmail=if(like(user_name,"%".p_last."%"),"Yes","No")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Dec 2014 16:14:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-query/m-p/159894#M45153</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-12-16T16:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-query/m-p/159895#M45154</link>
      <description>&lt;P&gt;Thank you very much - that works perfectly!!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2014 16:31:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-query/m-p/159895#M45154</guid>
      <dc:creator>brenisro</dc:creator>
      <dc:date>2014-12-16T16:31:27Z</dc:date>
    </item>
  </channel>
</rss>

