<?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: Field extraction with multiple matches per line in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-with-multiple-matches-per-line/m-p/76469#M19346</link>
    <description>&lt;P&gt;Hi I also had a same question.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/53883/how-to-configure-mv_add-in-the-search-language"&gt;http://splunk-base.splunk.com/answers/53883/how-to-configure-mv_add-in-the-search-language&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;and I came up with this search...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"some saerch to filter" | rex field=string max_match=10000 "(?&amp;lt;chars&amp;gt;...)" | chart count by string chars
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will get any 3 chars in a field called string.&lt;/P&gt;

&lt;P&gt;I hope this also good for you.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Aug 2012 03:28:48 GMT</pubDate>
    <dc:creator>melonman</dc:creator>
    <dc:date>2012-08-10T03:28:48Z</dc:date>
    <item>
      <title>Field extraction with multiple matches per line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-with-multiple-matches-per-line/m-p/76467#M19344</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'm trying to pull out the MAC addresses from a series of records which is mostly working using the following regex in the field extraction :-&lt;/P&gt;

&lt;P&gt;(?i) .*? (?P&lt;MAC_ADDRESSES&gt;[a-fA-F0-9]+.[a-fA-F0-9]+.[a-fA-F0-9]+)(?= )&lt;/MAC_ADDRESSES&gt;&lt;/P&gt;

&lt;P&gt;The problem I'm finding is that I have two MAC addresses in a number of records and the field extraction is only seeing the first in the record. The examples below show what I mean, only the &lt;STRONG&gt;Bold&lt;/STRONG&gt; MAC is being caught.&lt;/P&gt;

&lt;P&gt;Jun 15 14:54:26 10.2.196.20 90: Jun 15 13:55:00.703 UTC: %DOT11-6-ROAMED: Station &lt;STRONG&gt;0013.e8f5.f15d&lt;/STRONG&gt; Roamed to 001e.4ae0.3f50&lt;/P&gt;

&lt;P&gt;Jun 15 14:34:55 10.2.196.26 32: 000030: Jun 15 13:35:29.536 UTC: %DOT11-6-ROAMED: Station &lt;STRONG&gt;2477.0338.1c64&lt;/STRONG&gt; Roamed to 001e.4ae0.3dc0&lt;/P&gt;

&lt;P&gt;Jun 15 14:33:34 10.2.196.36 4689: 012274: Jun 15 13:34:08.300 UTC: %DOT11-6-ROAMED: Station &lt;STRONG&gt;5894.6b3e.f98c&lt;/STRONG&gt; Roamed to 001e.7a17.c670&lt;/P&gt;

&lt;P&gt;Jun 15 14:33:32 10.2.196.36 4686: 012271: Jun 15 13:34:06.734 UTC: %DOT11-6-ROAMED: Station &lt;STRONG&gt;8853.2ec4.b913&lt;/STRONG&gt; Roamed to 001e.7a17.bb90&lt;/P&gt;

&lt;P&gt;Jun 15 14:33:05 10.2.196.32 125: 000123: Jun 15 13:33:39.710 UTC: %DOT11-6-ROAMED: Station &lt;STRONG&gt;2477.0317.10b0&lt;/STRONG&gt; Roamed to 001e.4ade.ed50&lt;/P&gt;

&lt;P&gt;Is there a way to catch multiple occurrences on the same line?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2012 14:19:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-with-multiple-matches-per-line/m-p/76467#M19344</guid>
      <dc:creator>martinpugh</dc:creator>
      <dc:date>2012-06-15T14:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with multiple matches per line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-with-multiple-matches-per-line/m-p/76468#M19345</link>
      <description>&lt;P&gt;Certainly. By default Splunk will only match once per event and "discard" other matches it finds. This is defined by the &lt;CODE&gt;MV_ADD&lt;/CODE&gt; parameter in &lt;CODE&gt;transforms.conf&lt;/CODE&gt;, which is &lt;CODE&gt;false&lt;/CODE&gt; by default.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MV_ADD = [true|false]
* NOTE: This attribute is only valid for search-time field extractions.
* Optional. Controls what the extractor does when it finds a field which already exists.
* If set to true, the extractor makes the field a multivalued field and appends the 
* newly found value, otherwise the newly found value is discarded.
* Defaults to false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is if you've setup a REPORT directive in &lt;CODE&gt;props.conf&lt;/CODE&gt;. If you haven't, but used an EXTRACT directive instead, you will need to convert it to a REPORT and create the corresponding transform in &lt;CODE&gt;transforms.conf&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2012 14:43:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-with-multiple-matches-per-line/m-p/76468#M19345</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-06-15T14:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with multiple matches per line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-with-multiple-matches-per-line/m-p/76469#M19346</link>
      <description>&lt;P&gt;Hi I also had a same question.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/53883/how-to-configure-mv_add-in-the-search-language"&gt;http://splunk-base.splunk.com/answers/53883/how-to-configure-mv_add-in-the-search-language&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;and I came up with this search...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"some saerch to filter" | rex field=string max_match=10000 "(?&amp;lt;chars&amp;gt;...)" | chart count by string chars
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will get any 3 chars in a field called string.&lt;/P&gt;

&lt;P&gt;I hope this also good for you.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 03:28:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-with-multiple-matches-per-line/m-p/76469#M19346</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2012-08-10T03:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction with multiple matches per line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-with-multiple-matches-per-line/m-p/560620#M159333</link>
      <description>&lt;P&gt;Thanks worked for me!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 14:47:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-with-multiple-matches-per-line/m-p/560620#M159333</guid>
      <dc:creator>becksyboy</dc:creator>
      <dc:date>2021-07-23T14:47:15Z</dc:date>
    </item>
  </channel>
</rss>

