<?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: Create a new field based on existing filelds in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Create-a-new-field-based-on-existing-filelds/m-p/620116#M215559</link>
    <description>&lt;P&gt;The match function uses a regular expression syntax to match the value in the field - "." is a wildcard character in regular expressions so these (along with other special characters) need to be escaped.&amp;nbsp; Field names with special characters should also be quoted with single quotes. Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="main" AND source=jira | spath
| eval summary=if(match ('fields.summary',"\.DT\-"),"Security Incident","no")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 14:00:08 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-11-08T14:00:08Z</dc:date>
    <item>
      <title>Create a new field based on existing filelds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-new-field-based-on-existing-filelds/m-p/620113#M215557</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My requirement is if the field "fields.summary" contains events that contain ".DT", then I want to create a new field "Summary", and set the value of the new field as&amp;nbsp;Security Incident. I have created the below query, but its not working as expected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index="main" AND source=jira | spath&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| eval summary=if(match (fields.summary,".DT-"),"Security Incident","no")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;--&lt;BR /&gt;Thanks,&lt;BR /&gt;Siddarth&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 13:46:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-new-field-based-on-existing-filelds/m-p/620113#M215557</guid>
      <dc:creator>sidtalup27</dc:creator>
      <dc:date>2022-11-08T13:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new field based on existing filelds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-new-field-based-on-existing-filelds/m-p/620116#M215559</link>
      <description>&lt;P&gt;The match function uses a regular expression syntax to match the value in the field - "." is a wildcard character in regular expressions so these (along with other special characters) need to be escaped.&amp;nbsp; Field names with special characters should also be quoted with single quotes. Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="main" AND source=jira | spath
| eval summary=if(match ('fields.summary',"\.DT\-"),"Security Incident","no")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 14:00:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-new-field-based-on-existing-filelds/m-p/620116#M215559</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-11-08T14:00:08Z</dc:date>
    </item>
  </channel>
</rss>

