<?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 do you write rex to extract unstructured field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315928#M94543</link>
    <description>&lt;P&gt;If you have the option, define your sourcetype for this log source in &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/propsconf" target="_blank"&gt;props.conf&lt;/A&gt; and use the FIELD_NAMES / FIELD_DELIMITER to assign the proper field names. Keeps your searches clean... &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 16:16:27 GMT</pubDate>
    <dc:creator>s2_splunk</dc:creator>
    <dc:date>2020-09-29T16:16:27Z</dc:date>
    <item>
      <title>How do you write rex to extract unstructured field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315925#M94540</link>
      <description>&lt;P&gt;I have the below log. I want to extract the sixth column as a field, in that column I have different types values. Some of them are decimals some of the are single digit as you can see. I tried IFX it's not working as expected and don't how to write rex for this kind of  values, help me to write rex for this field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10/1/2017       0:10:01            all        9.13     0          1.68     6.6       0          82.59
10/1/2017       0:20:01            all        7.46     0          0          5.74     0          85.17
10/1/2017       0:30:01            all        9.05     0          129     1.53     0          88.13
10/1/2017       0:40:01            all        7.77     0          1.45     1.23     0          89.54
10/1/2017       0:50:01            all        7.08     0          1.5       1.41     0          90.02
10/1/2017       1:00:01            all        6.46     0          1.43     1.82     0          90.29
10/1/2017       1:10:01            all        45.4     0          4.2       29.27   0          21.13
10/1/2017       1:20:01            all        61.74   0          4.74     31.19   0          2.32
10/1/2017       1:30:01            all        64.17   0          4.72     26.31   0          4.81
10/1/2017       1:40:01            all        47.54   0          4.23     19.44   0          28.79
10/1/2017       1:50:01            all        44.59   0          3.68     17.47   0          34.27
10/1/2017       2:00:01            all        49.16   0          4.22     13.47   0          33.15
10/1/2017       2:10:01            all        41.98   0          3.95     16.47   0          37.59
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 17:25:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315925#M94540</guid>
      <dc:creator>haja4nhn</dc:creator>
      <dc:date>2017-10-17T17:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write rex to extract unstructured field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315926#M94541</link>
      <description>&lt;P&gt;@haja4nhn&lt;/P&gt;

&lt;P&gt;try this,&lt;/P&gt;

&lt;P&gt;you base query or search | rex field=_raw "\d+\/\d+\/\d+\s+\d+:\d+:\d+\s+\S+\s+\d+.\d+\s+\d+\s+(?P&amp;lt;field6&amp;gt;\d+.\d+)"&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 18:07:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315926#M94541</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2017-10-17T18:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write rex to extract unstructured field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315927#M94542</link>
      <description>&lt;P&gt;This is probably the most efficient way to do the field extraction:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^(\S+\s+){5}(?P&amp;lt;field6&amp;gt;\S+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It requires few steps and has the advantage of being able to extract any data, including strings. It does require that the spaces only be between columns of the data (so no fields that have spaces in them). It's also pretty easy to read and modify.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 18:53:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315927#M94542</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-10-17T18:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write rex to extract unstructured field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315928#M94543</link>
      <description>&lt;P&gt;If you have the option, define your sourcetype for this log source in &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/propsconf" target="_blank"&gt;props.conf&lt;/A&gt; and use the FIELD_NAMES / FIELD_DELIMITER to assign the proper field names. Keeps your searches clean... &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:16:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315928#M94543</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2020-09-29T16:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write rex to extract unstructured field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315929#M94544</link>
      <description>&lt;P&gt;Hey @haja4nhn, if they solved your problem, remember to "√Accept" an answer to award karma points &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 21:58:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315929#M94544</guid>
      <dc:creator>lfedak_splunk</dc:creator>
      <dc:date>2017-10-17T21:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write rex to extract unstructured field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315930#M94545</link>
      <description>&lt;P&gt;@cpetterborg&lt;/P&gt;

&lt;P&gt;Thanks for your reply.&lt;/P&gt;

&lt;P&gt;Let me check this..&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:37:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315930#M94545</guid>
      <dc:creator>haja4nhn</dc:creator>
      <dc:date>2017-10-20T13:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write rex to extract unstructured field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315931#M94546</link>
      <description>&lt;P&gt;@sbbadri&lt;/P&gt;

&lt;P&gt;I have tried this looks like the values are changing. I checking and trying to alter your rex.&lt;/P&gt;

&lt;P&gt;Lets see.&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:38:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315931#M94546</guid>
      <dc:creator>haja4nhn</dc:creator>
      <dc:date>2017-10-20T13:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write rex to extract unstructured field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315932#M94547</link>
      <description>&lt;P&gt;Anchor on the word "all",&lt;BR /&gt;
props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[myst]
EXTRACT-field1 = all\s+(\S+\s+){2}(?&amp;lt;field1&amp;gt;[\d\.]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;195 steps.  &lt;A href="https://regex101.com/r/l2PGs6/2"&gt;https://regex101.com/r/l2PGs6/2&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Change myst to your sourcetype and field1 to your field name.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 15:58:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-rex-to-extract-unstructured-field/m-p/315932#M94547</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2017-10-20T15:58:41Z</dc:date>
    </item>
  </channel>
</rss>

