<?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: Can you help me write a regular expression in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473409#M192369</link>
    <description>&lt;P&gt;Can you please provide expected output for each field ?&lt;/P&gt;</description>
    <pubDate>Fri, 01 Nov 2019 14:57:42 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2019-11-01T14:57:42Z</dc:date>
    <item>
      <title>Can you help me write a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473408#M192368</link>
      <description>&lt;P&gt;Need to extract Insurer , User , Dealer name &lt;/P&gt;

&lt;P&gt;2019-11-01 06:54:20 W3SVC4 AUSYD11AS90 172.29.5.28 GET /Areas/Framework/Content/Style/fonts/open-sans-v10-latin-regular.woff2 - 80 - 172.29.0.250 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:60.0)+Gecko/20100101+Firefox/60.0 AUTOMOTIVE_LastLoginId=MS3352919;+External_UserType=USER1;+External_ID=tEST1;+First_level_Hierarchy=TEST2;+Second_level_Hierarchy=tEST;+Account_Type=DBA;+Dealer_Outlet_Name=;+Title=;+Insurer=ABC;+encryptedcookie=470097324.20480.0000;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:47:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473408#M192368</guid>
      <dc:creator>rashi83</dc:creator>
      <dc:date>2020-09-30T02:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me write a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473409#M192369</link>
      <description>&lt;P&gt;Can you please provide expected output for each field ?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 14:57:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473409#M192369</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-11-01T14:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me write a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473410#M192370</link>
      <description>&lt;P&gt;For example Insurer field = ABC &lt;BR /&gt;
Account_Type = DBA&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 14:59:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473410#M192370</guid>
      <dc:creator>rashi83</dc:creator>
      <dc:date>2019-11-01T14:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me write a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473411#M192371</link>
      <description>&lt;P&gt;When you say "User", do you actually mean "External_ID" or some other named field?&lt;BR /&gt;
Technically speaking, your example contains a user field with a value of "-".&lt;/P&gt;

&lt;P&gt;The same clarification applies for "Dealer name" -- do you actually mean "Dealer_Outlet_Name"?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:48:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473411#M192371</guid>
      <dc:creator>rmmiller</dc:creator>
      <dc:date>2020-09-30T02:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me write a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473412#M192372</link>
      <description>&lt;P&gt;I am interested in extracting these fields - &lt;BR /&gt;
+Insurer&lt;BR /&gt;
+Dealer_Outlet_Name&lt;BR /&gt;
+Account_Type&lt;/P&gt;

&lt;P&gt;Since some times sequence of these fields can be changes, I want regular expression which contains the field name too like "hostname:(?P[^,]+)[^\n]"&lt;/P&gt;

&lt;P&gt;How do I do for the above fields&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:47:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473412#M192372</guid>
      <dc:creator>rashi83</dc:creator>
      <dc:date>2020-09-30T02:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me write a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473413#M192373</link>
      <description>&lt;P&gt;Try this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="2019-11-01 06:54:20 W3SVC4 AUSYD11AS90 172.29.5.28 GET /Areas/Framework/Content/Style/fonts/open-sans-v10-latin-regular.woff2 - 80 - 172.29.0.250 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:60.0)+Gecko/20100101+Firefox/60.0 AUTOMOTIVE_LastLoginId=MS3352919;+External_UserType=USER1;+External_ID=tEST1;+First_level_Hierarchy=TEST2;+Second_level_Hierarchy=tEST;+Account_Type=DBA;+Dealer_Outlet_Name=;+Title=;+Insurer=ABC;+encryptedcookie=470097324.20480.0000;" 
| rex "Account_Type=(?&amp;lt;Account_Type&amp;gt;[^\(;\+)]+)" 
| rex "Insurer=(?&amp;lt;Insurer&amp;gt;[^\(;\+)]+)" 
| rex "Dealer_Outlet_Name=(?&amp;lt;Dealer_Outlet_Name&amp;gt;[^\(;\+)]+)" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in your environment you should try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=&amp;lt;your_index&amp;gt;| rex "Account_Type=(?&amp;lt;Account_Type&amp;gt;[^\(;\+)]+)" 
 | rex "Insurer=(?&amp;lt;Insurer&amp;gt;[^\(;\+)]+)" 
 | rex "Dealer_Outlet_Name=(?&amp;lt;Dealer_Outlet_Name&amp;gt;[^\(;\+)]+)" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Nov 2019 15:24:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473413#M192373</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-11-01T15:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me write a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473414#M192374</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| stats count
| eval _raw="2019-11-01 06:54:20 W3SVC4 AUSYD11AS90 172.29.5.28 GET /Areas/Framework/Content/Style/fonts/open-sans-v10-latin-regular.woff2 - 80 - 172.29.0.250 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:60.0)+Gecko/20100101+Firefox/60.0 AUTOMOTIVE_LastLoginId=MS3352919;+External_UserType=USER1;+External_ID=tEST1;+First_level_Hierarchy=TEST2;+Second_level_Hierarchy=tEST;+Account_Type=DBA;+Dealer_Outlet_Name=;+Title=;+Insurer=ABC;+encryptedcookie=470097324.20480.0000;"
| kv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi,&lt;BR /&gt;
Insuer:&lt;BR /&gt;
User:&lt;BR /&gt;
Dealer name:&lt;BR /&gt;
What is the value for this log?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 15:25:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473414#M192374</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-11-01T15:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me write a regular expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473415#M192375</link>
      <description>&lt;P&gt;Thanks, it worked&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 20:06:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-write-a-regular-expression/m-p/473415#M192375</guid>
      <dc:creator>rashi83</dc:creator>
      <dc:date>2019-11-01T20:06:56Z</dc:date>
    </item>
  </channel>
</rss>

