<?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 to write regex to extract this line in this very long field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-this-line-in-this-very-long-field/m-p/475716#M133690</link>
    <description>&lt;P&gt;Hi lsy9891,&lt;/P&gt;

&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval Message="Fault bucket , type 0
Event Name: ServiceHang
Response: Not available
Cab Id: 0

Problem signature:
P1: MonsterWindowsService
P2: Monster.Services.Windows.ServiceBase.exe
P3: 2019.15.0.12
P4: 10
P5: 2
P6: 
P7: 
P8: 
P9: 
P10:

Attached files:

These files may be available here:


Analysis symbol: 
Rechecking for solution: 0
Report Id: f9938371-b8d1-11e9-8f94-00505682bfbe
Report Status: 0" 
| rex field="Message" "P1: (?&amp;lt;my_P1_field&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The field called &lt;CODE&gt;my_P1_field&lt;/CODE&gt; will contain &lt;CODE&gt;MonsterWindowsService&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2019 03:59:45 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2019-09-12T03:59:45Z</dc:date>
    <item>
      <title>How to write regex to extract this line in this very long field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-this-line-in-this-very-long-field/m-p/475715#M133689</link>
      <description>&lt;P&gt;Hi, I have a field called message: &lt;/P&gt;

&lt;P&gt;Message="Fault bucket , type 0&lt;BR /&gt;
Event Name: ServiceHang&lt;BR /&gt;
Response: Not available&lt;BR /&gt;
Cab Id: 0&lt;/P&gt;

&lt;P&gt;Problem signature:&lt;BR /&gt;
&lt;STRONG&gt;P1: MonsterWindowsService&lt;/STRONG&gt;&lt;BR /&gt;
P2: Monster.Services.Windows.ServiceBase.exe&lt;BR /&gt;
P3: 2019.15.0.12&lt;BR /&gt;
P4: 10&lt;BR /&gt;
P5: 2&lt;BR /&gt;
P6: &lt;BR /&gt;
P7: &lt;BR /&gt;
P8: &lt;BR /&gt;
P9: &lt;BR /&gt;
P10: &lt;/P&gt;

&lt;P&gt;Attached files:&lt;/P&gt;

&lt;P&gt;These files may be available here:&lt;/P&gt;

&lt;P&gt;Analysis symbol: &lt;BR /&gt;
Rechecking for solution: 0&lt;BR /&gt;
Report Id: f9938371-b8d1-11e9-8f94-00505682bfbe&lt;BR /&gt;
Report Status: 0"&lt;/P&gt;

&lt;P&gt;And I'm trying to extract the line in bold? Is this possible or is there an easier way other than to write the regex?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 02:20:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-this-line-in-this-very-long-field/m-p/475715#M133689</guid>
      <dc:creator>lsy9891</dc:creator>
      <dc:date>2019-09-12T02:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex to extract this line in this very long field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-this-line-in-this-very-long-field/m-p/475716#M133690</link>
      <description>&lt;P&gt;Hi lsy9891,&lt;/P&gt;

&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval Message="Fault bucket , type 0
Event Name: ServiceHang
Response: Not available
Cab Id: 0

Problem signature:
P1: MonsterWindowsService
P2: Monster.Services.Windows.ServiceBase.exe
P3: 2019.15.0.12
P4: 10
P5: 2
P6: 
P7: 
P8: 
P9: 
P10:

Attached files:

These files may be available here:


Analysis symbol: 
Rechecking for solution: 0
Report Id: f9938371-b8d1-11e9-8f94-00505682bfbe
Report Status: 0" 
| rex field="Message" "P1: (?&amp;lt;my_P1_field&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The field called &lt;CODE&gt;my_P1_field&lt;/CODE&gt; will contain &lt;CODE&gt;MonsterWindowsService&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 03:59:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-this-line-in-this-very-long-field/m-p/475716#M133690</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-09-12T03:59:45Z</dc:date>
    </item>
  </channel>
</rss>

