<?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: Reuse field extraction in another field extraction/transformation? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Reuse-field-extraction-in-another-field-extraction/m-p/455822#M128872</link>
    <description>&lt;P&gt;@jmartens did this help you?&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jul 2018 15:49:30 GMT</pubDate>
    <dc:creator>skoelpin</dc:creator>
    <dc:date>2018-07-24T15:49:30Z</dc:date>
    <item>
      <title>Reuse field extraction in another field extraction/transformation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Reuse-field-extraction-in-another-field-extraction/m-p/455820#M128870</link>
      <description>&lt;P&gt;I am looking for a solution to extract certain types of UIDs and therefore defined a basic UID field extraction: &lt;CODE&gt;(?&amp;lt;UID&amp;gt;\d+(?:\.\d+)+)&lt;/CODE&gt;&lt;BR /&gt;
as it nicely matches my UID's in forms like 1.2.3454.324234.123.123.1111 etc.&lt;/P&gt;

&lt;P&gt;Since there are different type of UIDs in my data I would now like to reuse the UID I defined to extract the UIDs and assign them to a new field, for instance I would like to extract the UID from below and assign it to SOPInstanceUID within the same app:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Processing C-STORE-RQ for SOP Class 'STANDARD_RT_IMAGE' and SOP Instance UID '1.2.246.352.62.1.4620745920092066496.17329666369531438486'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is it possible to reuse my already defined UID and do something like a regex like this: &lt;CODE&gt;SOP\sInstance\sUID\s\'(?&amp;lt;SOPInstanceUID&amp;gt;UID)'&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 13:50:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Reuse-field-extraction-in-another-field-extraction/m-p/455820#M128870</guid>
      <dc:creator>jmartens</dc:creator>
      <dc:date>2018-07-23T13:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reuse field extraction in another field extraction/transformation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Reuse-field-extraction-in-another-field-extraction/m-p/455821#M128871</link>
      <description>&lt;P&gt;Yes, just pass the &lt;CODE&gt;field=&lt;/CODE&gt; parameter. This will tell Splunk to extract a value from an existing field &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=UID SOP\sInstance\sUID\s\'(?&amp;lt;SOPInstanceUID&amp;gt;UID)'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Jul 2018 17:00:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Reuse-field-extraction-in-another-field-extraction/m-p/455821#M128871</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-07-23T17:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reuse field extraction in another field extraction/transformation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Reuse-field-extraction-in-another-field-extraction/m-p/455822#M128872</link>
      <description>&lt;P&gt;@jmartens did this help you?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 15:49:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Reuse-field-extraction-in-another-field-extraction/m-p/455822#M128872</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-07-24T15:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reuse field extraction in another field extraction/transformation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Reuse-field-extraction-in-another-field-extraction/m-p/455823#M128873</link>
      <description>&lt;P&gt;You can capture the same thing multiple times like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "(?&amp;lt;UID1&amp;gt;(?&amp;lt;UID2&amp;gt;(?&amp;lt;UID3&amp;gt;(?&amp;lt;UID4&amp;gt;\d+(?:\.\d+)+))))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Jul 2018 16:02:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Reuse-field-extraction-in-another-field-extraction/m-p/455823#M128873</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-07-24T16:02:32Z</dc:date>
    </item>
  </channel>
</rss>

