<?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 How to write regex to extract all values for a field at search time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186582#M53730</link>
    <description>&lt;P&gt;Hello Guys,&lt;/P&gt;

&lt;P&gt;I have the following log, and i need to extract all the TagID. I have wrote this regular expression but it only extract the first TagID &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;| rex "(?i)(TagID){(?P&lt;TAGID&gt;\w+)}" &lt;/TAGID&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Tue Aug 19 2014 04:47:18,515 EDT DEBUG wmservice.business.mobilehospital  - [saveDeviceRead2 - HM10042 - roy.imad] Method invoked with parameters : [username]{roy.imad}[deviceId]{HM10042}[macAddress]{XXXX-xxxxx-xxxxx-xxxxxx-xxx}[readPacket]{(TagID){E0040100206E6349}|(TagID){E0040100206E7BA7}|(TagID){E0040100206E7917}|(TagID){E0040100206E7BF7}|(TagID){E0040100206E7BAF}|(TagID){E0040100206E7967}|(TagID){E0040100206E64A1}|(TagID){E0040100206E90F4}|(TagID){E0040100206E64A9}|(TagID){E0040100206E796F}|(TagID){E0040100206E791F}|(TagID){E0040100206E90FC}}[readMode]{A}[updateEventInfo]{(Disposition){}(RGA){}(PO){}(SO){}(DetailDisposition){}(EncounterID){null}(DestinationID){}(ReturnID){null}(DispositionFlag){false}(RGAFlag){false}(POFlag){false}(SOFlag){false}(DetailDispositionFlag){false}(EncounterIDFlag){false}(DestinationIDFlag){false}(ReturnIDFlag){false}}[createAudit]{true}[auditInfo]{(EndpointID){RU00014GN1}(Signature){}(ImageSignature){null}(SignerName){null}(Comment){}}&lt;/P&gt;</description>
    <pubDate>Tue, 19 Aug 2014 11:10:59 GMT</pubDate>
    <dc:creator>royimad</dc:creator>
    <dc:date>2014-08-19T11:10:59Z</dc:date>
    <item>
      <title>How to write regex to extract all values for a field at search time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186582#M53730</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;

&lt;P&gt;I have the following log, and i need to extract all the TagID. I have wrote this regular expression but it only extract the first TagID &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;| rex "(?i)(TagID){(?P&lt;TAGID&gt;\w+)}" &lt;/TAGID&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Tue Aug 19 2014 04:47:18,515 EDT DEBUG wmservice.business.mobilehospital  - [saveDeviceRead2 - HM10042 - roy.imad] Method invoked with parameters : [username]{roy.imad}[deviceId]{HM10042}[macAddress]{XXXX-xxxxx-xxxxx-xxxxxx-xxx}[readPacket]{(TagID){E0040100206E6349}|(TagID){E0040100206E7BA7}|(TagID){E0040100206E7917}|(TagID){E0040100206E7BF7}|(TagID){E0040100206E7BAF}|(TagID){E0040100206E7967}|(TagID){E0040100206E64A1}|(TagID){E0040100206E90F4}|(TagID){E0040100206E64A9}|(TagID){E0040100206E796F}|(TagID){E0040100206E791F}|(TagID){E0040100206E90FC}}[readMode]{A}[updateEventInfo]{(Disposition){}(RGA){}(PO){}(SO){}(DetailDisposition){}(EncounterID){null}(DestinationID){}(ReturnID){null}(DispositionFlag){false}(RGAFlag){false}(POFlag){false}(SOFlag){false}(DetailDispositionFlag){false}(EncounterIDFlag){false}(DestinationIDFlag){false}(ReturnIDFlag){false}}[createAudit]{true}[auditInfo]{(EndpointID){RU00014GN1}(Signature){}(ImageSignature){null}(SignerName){null}(Comment){}}&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 11:10:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186582#M53730</guid>
      <dc:creator>royimad</dc:creator>
      <dc:date>2014-08-19T11:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex to extract all values for a field at search time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186583#M53731</link>
      <description>&lt;P&gt;Hi royimad,&lt;/P&gt;

&lt;P&gt;try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rex "\(TagID\)\{(?&amp;lt;tagid&amp;gt;\w+)\}"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;tested and working on &lt;A href="http://regexr.com/v1/"&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/A&gt;&lt;A href="http://regexr.com/v1/" target="test_blank"&gt;http://regexr.com/v1/&lt;/A&gt; with your provided event example...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 11:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186583#M53731</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-08-19T11:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex to extract all values for a field at search time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186584#M53732</link>
      <description>&lt;P&gt;if i want only to count the number of occurrence of the word TagID without selecting the values how can i do that&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 11:45:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186584#M53732</guid>
      <dc:creator>royimad</dc:creator>
      <dc:date>2014-08-19T11:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex to extract all values for a field at search time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186585#M53733</link>
      <description>&lt;P&gt;I just want to count the number of occurrence of the word TagID, is that feasible ?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 11:46:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186585#M53733</guid>
      <dc:creator>royimad</dc:creator>
      <dc:date>2014-08-19T11:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex to extract all values for a field at search time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186586#M53734</link>
      <description>&lt;P&gt;working on that in your other question &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; ....&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 11:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-to-extract-all-values-for-a-field-at-search/m-p/186586#M53734</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-08-19T11:49:19Z</dc:date>
    </item>
  </channel>
</rss>

