<?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 to add two REGEXes to transforms.conf? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-two-REGEXes-to-transforms-conf/m-p/236384#M70227</link>
    <description>&lt;P&gt;Please share examples of the strings you're trying to match.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Nov 2015 13:05:38 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2015-11-16T13:05:38Z</dc:date>
    <item>
      <title>How to add two REGEXes to transforms.conf?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-two-REGEXes-to-transforms-conf/m-p/236383#M70226</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I need to add two RegEx  to transforms.conf and props.conf. If I add one block of code, testing each REGEX independently works.&lt;/P&gt;

&lt;P&gt;If I duplicate the same block of code adding another REGEX, it fails.&lt;/P&gt;

&lt;P&gt;I assume it's related to using the same variables but am uncertain.&lt;/P&gt;

&lt;H2&gt;WORKS:&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;  PROPS FILE: (PROPS.CONF):
  =======================
  [source::/path/to/your/access.log*]
  TRANSFORMS-null= setnull

  TRANSFORM FILE:  (transform.conf):
  ==============================
  [setnull]
  REGEX = \"GET\s\/pictures
  DEST_KEY = queue
  FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;H2&gt;PROBLEM:&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;PROPS FILE: (PROPS.CONF):
=======================
[source::/path/to/your/access.log*]
TRANSFORMS-null= setnull

TRANSFORM FILE:  (transform.conf):
==============================
[setnull]
REGEX = \"GET\s\/t_static\/clients\/(.*)\/images
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 12:13:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-two-REGEXes-to-transforms-conf/m-p/236383#M70226</guid>
      <dc:creator>dmccabe2</dc:creator>
      <dc:date>2015-11-16T12:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add two REGEXes to transforms.conf?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-two-REGEXes-to-transforms-conf/m-p/236384#M70227</link>
      <description>&lt;P&gt;Please share examples of the strings you're trying to match.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 13:05:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-two-REGEXes-to-transforms-conf/m-p/236384#M70227</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-11-16T13:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to add two REGEXes to transforms.conf?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-two-REGEXes-to-transforms-conf/m-p/236385#M70228</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;what i understood is you want to use multiple regex for similar log lines. As soon as you determined Regex1 and Regex2, you should use this structure below to have 1 regex query.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = (Regex1|Regex2) in your transform.conf
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope it is ok.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Gokhan&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 13:42:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-two-REGEXes-to-transforms-conf/m-p/236385#M70228</guid>
      <dc:creator>gyarici</dc:creator>
      <dc:date>2015-11-16T13:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to add two REGEXes to transforms.conf?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-two-REGEXes-to-transforms-conf/m-p/236386#M70229</link>
      <description>&lt;P&gt;Thak you so much I will try&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 14:06:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-two-REGEXes-to-transforms-conf/m-p/236386#M70229</guid>
      <dc:creator>dmccabe2</dc:creator>
      <dc:date>2015-11-16T14:06:52Z</dc:date>
    </item>
  </channel>
</rss>

