<?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: RegEx or Field Transformation ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/RegEx-or-Field-Transformation/m-p/107690#M28005</link>
    <description>&lt;P&gt;You actually don't need transforms, you could put the following into props.conf on the search head (remove the \ that precedes the word MyField, I had to put that in there for formatting purposes):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-field = (?&amp;lt;\MyField&amp;gt;\d+)\)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This would go in the stanza for the source/sourcetype in question.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Feb 2013 18:59:56 GMT</pubDate>
    <dc:creator>sbrant_splunk</dc:creator>
    <dc:date>2013-02-01T18:59:56Z</dc:date>
    <item>
      <title>RegEx or Field Transformation ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/RegEx-or-Field-Transformation/m-p/107688#M28003</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have an event that have this format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[13/01/31@00:14:05.269+0100] P-1770312 T-000001 1 AS -- (Procedure: 'put-one-message llwks.c' Line:1610) ** Attempt to write to closed stream swk-log. (1387)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I try to find (since some days ago) a RegEx expression in order to extract the value "&lt;STRONG&gt;1387&lt;/STRONG&gt;" but without selecting the "&lt;STRONG&gt;()&lt;/STRONG&gt;" in the target extracted value.&lt;/P&gt;

&lt;P&gt;Is it possible to achieve this by RegEx or must I use Field Transformation ?&lt;/P&gt;

&lt;P&gt;Thanks in advance for your helps ;o)))&lt;/P&gt;

&lt;P&gt;Dominique&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2013 11:37:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/RegEx-or-Field-Transformation/m-p/107688#M28003</guid>
      <dc:creator>righettod</dc:creator>
      <dc:date>2013-02-01T11:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx or Field Transformation ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/RegEx-or-Field-Transformation/m-p/107689#M28004</link>
      <description>&lt;P&gt;How about something like this?  You may need to customize it further to match other samples of your data.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;...your search... | rex "[(](?&amp;lt;MyField&amp;gt;\d+)[)]"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2013 12:47:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/RegEx-or-Field-Transformation/m-p/107689#M28004</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2013-02-01T12:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx or Field Transformation ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/RegEx-or-Field-Transformation/m-p/107690#M28005</link>
      <description>&lt;P&gt;You actually don't need transforms, you could put the following into props.conf on the search head (remove the \ that precedes the word MyField, I had to put that in there for formatting purposes):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-field = (?&amp;lt;\MyField&amp;gt;\d+)\)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This would go in the stanza for the source/sourcetype in question.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2013 18:59:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/RegEx-or-Field-Transformation/m-p/107690#M28005</guid>
      <dc:creator>sbrant_splunk</dc:creator>
      <dc:date>2013-02-01T18:59:56Z</dc:date>
    </item>
  </channel>
</rss>

