<?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 use a combination of multiple regex cindition in transforms.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-a-combination-of-multiple-regex-cindition-in/m-p/562750#M100279</link>
    <description>&lt;P&gt;Hi Expert,&lt;BR /&gt;I am trying to confiture transforms that has multiple condition for match, with the following condition:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;(word1 OR word2) AND word3 NOT ('phrase 4' OR 'phase 5')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I tried the following config, but still no luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[source::.../input.log]
REGEX =^(?=.*(word1|word2))(?=.*word3)(?!.*(phrase 4|phrase 5)).*$
FORMAT = sourcetype::mytype
DEST_KEY = MetaData:Sourcetype&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The regex may be wrong or there is another workaround to archive this...&amp;nbsp;&lt;BR /&gt;Any comment and/or recommendation would be really appreciated..&lt;/P&gt;</description>
    <pubDate>Tue, 10 Aug 2021 14:57:07 GMT</pubDate>
    <dc:creator>hyugma</dc:creator>
    <dc:date>2021-08-10T14:57:07Z</dc:date>
    <item>
      <title>How to use a combination of multiple regex cindition in transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-a-combination-of-multiple-regex-cindition-in/m-p/562750#M100279</link>
      <description>&lt;P&gt;Hi Expert,&lt;BR /&gt;I am trying to confiture transforms that has multiple condition for match, with the following condition:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;(word1 OR word2) AND word3 NOT ('phrase 4' OR 'phase 5')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I tried the following config, but still no luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[source::.../input.log]
REGEX =^(?=.*(word1|word2))(?=.*word3)(?!.*(phrase 4|phrase 5)).*$
FORMAT = sourcetype::mytype
DEST_KEY = MetaData:Sourcetype&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The regex may be wrong or there is another workaround to archive this...&amp;nbsp;&lt;BR /&gt;Any comment and/or recommendation would be really appreciated..&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 14:57:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-a-combination-of-multiple-regex-cindition-in/m-p/562750#M100279</guid>
      <dc:creator>hyugma</dc:creator>
      <dc:date>2021-08-10T14:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a combination of multiple regex cindition in transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-a-combination-of-multiple-regex-cindition-in/m-p/562754#M100280</link>
      <description>&lt;P&gt;IME, anchors aren't needed that often and it's a rare case that needs both ^ and $ anchors.&lt;/P&gt;&lt;P&gt;Have you used regex101.com to test your regular expression against samples of your data?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 15:25:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-a-combination-of-multiple-regex-cindition-in/m-p/562754#M100280</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-10T15:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a combination of multiple regex cindition in transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-a-combination-of-multiple-regex-cindition-in/m-p/564475#M100503</link>
      <description>&lt;P&gt;Thank you for the comment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are right, I would not need many anchors everywhere.&lt;BR /&gt;and I could confirm that the regex with AND and OR mixed worked.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 07:13:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-a-combination-of-multiple-regex-cindition-in/m-p/564475#M100503</guid>
      <dc:creator>hyugma</dc:creator>
      <dc:date>2021-08-24T07:13:56Z</dc:date>
    </item>
  </channel>
</rss>

