<?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: extracting data using rex field=_raw in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/593556#M76587</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244542"&gt;@sandysaahil&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I hint to create a new question, so more people can help you better and quicker!&lt;/P&gt;&lt;P&gt;Anyway, in the sample you shared there isn't any &lt;SPAN&gt;hypen,&amp;nbsp;&lt;/SPAN&gt;could you share some sample with and without&amp;nbsp;&lt;SPAN&gt;hypens?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2022 06:22:40 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-04-13T06:22:40Z</dc:date>
    <item>
      <title>How to extract data from log message data using rex field=_raw?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/592113#M76498</link>
      <description>&lt;P&gt;Hi Gurus,&lt;/P&gt;
&lt;P&gt;I am trying to extract data from log message using rex field=_raw. The regex I have is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Event &amp;lt;(?&amp;lt;eventNo&amp;gt;.*)&amp;gt;, Super &amp;lt;(?&amp;lt;super&amp;gt;.*)&amp;gt;, Charge &amp;lt;(?&amp;lt;oic&amp;gt;.*)&amp;gt;, number &amp;lt;(?&amp;lt;pcn&amp;gt;.*)&amp;gt;, Card &amp;lt;(?&amp;lt;cn&amp;gt;.*)&amp;gt;, &lt;STRONG&gt;CO &amp;lt;(?&amp;lt;co&amp;gt;.*)&amp;gt;,&lt;/STRONG&gt; Warn &amp;lt;(?&amp;lt;warn&amp;gt;.*)&amp;gt;" | table _time oic eventNo pcn cn super co warn&lt;/P&gt;
&lt;P&gt;and I am able to extract records. but the issue is may or may bot be present is the log and I still need to extract the rest of the data. I tried&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Event &amp;lt;(?&amp;lt;eventNo&amp;gt;.*)&amp;gt;, Super &amp;lt;(?&amp;lt;super&amp;gt;.*)&amp;gt;, Charge &amp;lt;(?&amp;lt;oic&amp;gt;.*)&amp;gt;, number &amp;lt;(?&amp;lt;pcn&amp;gt;.*)&amp;gt;, Card &amp;lt;(?&amp;lt;cn&amp;gt;.*)&amp;gt;, &lt;STRONG&gt;&lt;EM&gt;(&lt;/EM&gt;CO &amp;lt;(?&amp;lt;co&amp;gt;.*)&amp;gt;,&lt;EM&gt;)?&lt;/EM&gt;&lt;/STRONG&gt; Warn &amp;lt;(?&amp;lt;warn&amp;gt;.*)&amp;gt;" | table _time oic eventNo pcn cn super co warn&lt;/P&gt;
&lt;P&gt;It gives me the records which does nto contain this item. I want to extract all the records irrestive of whether it is present or not present. Please let me know what am I doing wrong. Thanks a lot in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 14:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/592113#M76498</guid>
      <dc:creator>sandysaahil</dc:creator>
      <dc:date>2022-04-04T14:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: extracting data using rex field=_raw</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/592114#M76499</link>
      <description>&lt;P&gt;Please provide examples of both types of data. I am assuming you are saying that CO may or may not be in the data...?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 01:23:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/592114#M76499</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-04-04T01:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: extracting data using rex field=_raw</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/592116#M76500</link>
      <description>&lt;P&gt;You are right &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;, the example data is&amp;nbsp;&lt;/P&gt;&lt;P&gt;Event &amp;lt;E523478&amp;gt;, Super &amp;lt;0&amp;gt;, Charge &amp;lt;N46965&amp;gt;, number &amp;lt;0199327578&amp;gt;, Card &amp;lt;2898005466&amp;gt;, Warn &amp;lt;true&amp;gt;&lt;BR /&gt;Event &amp;lt;E523478&amp;gt;, Super &amp;lt;0&amp;gt;, Charge &amp;lt;N46965&amp;gt;, number &amp;lt;0199327578&amp;gt;, Card &amp;lt;2898005466&amp;gt;, Warn &amp;lt;false&amp;gt;&lt;BR /&gt;Event &amp;lt;E521244&amp;gt;, Super &amp;lt;2&amp;gt;, Charge &amp;lt;N46965&amp;gt;, number &amp;lt;0199327750&amp;gt;, Card &amp;lt;2898005471&amp;gt;, CO &amp;lt;true&amp;gt;, Warn &amp;lt;true&amp;gt;&lt;/P&gt;&lt;P&gt;In third case, I get the value of CO which is missing from other two log statements. I want to ignore CO in other two but would like to extract CO if available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 01:37:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/592116#M76500</guid>
      <dc:creator>sandysaahil</dc:creator>
      <dc:date>2022-04-04T01:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: extracting data using rex field=_raw</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/592134#M76502</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244542"&gt;@sandysaahil&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in your logs you have a word thatr identifies each field, so you could create a regex for each field, in this way the other regexes aren't blocked when one field is missed, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| rex "Event \&amp;lt;(?&amp;lt;eventNo&amp;gt;\w*)"
| rex "Super \&amp;lt;(?&amp;lt;super&amp;gt;\d*)"
| rex "Charge \&amp;lt;(?&amp;lt;oic&amp;gt;\w*)"
| rex "number \&amp;lt;(?&amp;lt;pcn&amp;gt;\d*)"
| rex "Card \&amp;lt;(?&amp;lt;cn&amp;gt;\d*)"
| rex "CO \&amp;lt;(?&amp;lt;co&amp;gt;\w*)"
| rex "Warn \&amp;lt;(?&amp;lt;warn&amp;gt;\w*)" 
| table _time oic eventNo pcn cn super co warn&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 06:54:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/592134#M76502</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-04T06:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: extracting data using rex field=_raw</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/593529#M76585</link>
      <description>&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt; This is working perfectly fine. Thanks for the solution. Just want to check one more thing. one of the rex fields contains hypens. I tried using rex "Expiry \&amp;lt;(?[\d-]*)&amp;gt;" . It onle fetches first record but ignores rest of the same expiry fields from other logs. I get blank column for that. Do you think I am doing something wrong here. It works perfectly for all other words which does not contain special characters.</description>
      <pubDate>Wed, 13 Apr 2022 04:27:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/593529#M76585</guid>
      <dc:creator>sandysaahil</dc:creator>
      <dc:date>2022-04-13T04:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: extracting data using rex field=_raw</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/593556#M76587</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244542"&gt;@sandysaahil&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I hint to create a new question, so more people can help you better and quicker!&lt;/P&gt;&lt;P&gt;Anyway, in the sample you shared there isn't any &lt;SPAN&gt;hypen,&amp;nbsp;&lt;/SPAN&gt;could you share some sample with and without&amp;nbsp;&lt;SPAN&gt;hypens?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 06:22:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-extract-data-from-log-message-data-using-rex-field-raw/m-p/593556#M76587</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-13T06:22:40Z</dc:date>
    </item>
  </channel>
</rss>

