<?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: Help with regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578620#M201660</link>
    <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;I couldn’t say. There are many ways to do it. If you can be a bit more specific about your regex I might be able to help more.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Translating Boolean operators to regex is not trivial and it is not what regex was designed for originally.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You can replicate an OR the way I told you earlier. You can replicate an AND by simply doing a second regex after the first one but also within the same regular expression assuming the text you want to match follows that order.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In summary, if you can give us an example of what you are trying to match we could probably help you a lot more.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Dec 2021 10:45:30 GMT</pubDate>
    <dc:creator>javiergn</dc:creator>
    <dc:date>2021-12-16T10:45:30Z</dc:date>
    <item>
      <title>Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578608#M201656</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I need help with regex&lt;/P&gt;&lt;P&gt;I have search&lt;/P&gt;&lt;P&gt;index=*&lt;BR /&gt;| regex Commandline="my_regular_expression"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;How can I add one more regular expression with OR condition?&lt;/P&gt;&lt;P&gt;something like this&amp;nbsp;| regex Commandline="my_regular_expression" OR&amp;nbsp;| regex Commandline="my_regular_expression2"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tahnk you&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 09:46:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578608#M201656</guid>
      <dc:creator>bosseres</dc:creator>
      <dc:date>2021-12-16T09:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578612#M201657</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228794"&gt;@bosseres&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the OR condition on regular expression is the pipe "|",&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aasabatini_1-1639648449355.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17254i7CA491AF31B7CF3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aasabatini_1-1639648449355.png" alt="aasabatini_1-1639648449355.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I show you an example&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;rex filed=_raw "\w+\s+(?&amp;lt;name_field&amp;gt;\w+|\w+\d+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Dec 2021 09:52:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578612#M201657</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-12-16T09:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578613#M201658</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228794"&gt;@bosseres&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You could try with the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=*
| regex Commandline="(keyword1|keyword2)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if you can tell us exactly what sort of regex you want to implement we might be able to assist a bit more.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Javier&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 09:53:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578613#M201658</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2021-12-16T09:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578618#M201659</link>
      <description>&lt;P&gt;Thank you very much for responding, and what if I have such condition?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| regex Commandline="my_regular_expression" | (regex Commandline="my_regular_expression2" AND regex Commandline="my_regular_expression3" )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;(AND added)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 10:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578618#M201659</guid>
      <dc:creator>bosseres</dc:creator>
      <dc:date>2021-12-16T10:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578620#M201660</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;I couldn’t say. There are many ways to do it. If you can be a bit more specific about your regex I might be able to help more.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Translating Boolean operators to regex is not trivial and it is not what regex was designed for originally.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You can replicate an OR the way I told you earlier. You can replicate an AND by simply doing a second regex after the first one but also within the same regular expression assuming the text you want to match follows that order.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In summary, if you can give us an example of what you are trying to match we could probably help you a lot more.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 10:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578620#M201660</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2021-12-16T10:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578621#M201661</link>
      <description>&lt;P&gt;I have 3 regex expressions - regex1, regex2, regex&lt;/P&gt;&lt;P&gt;and I need to find events where field Commandline matches&amp;nbsp; regex1 or matches regex2 AND regex3&lt;/P&gt;&lt;P&gt;regex1 OR (regex2 AND regex3)&lt;/P&gt;&lt;P&gt;is it possible? thank you&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 11:10:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578621#M201661</guid>
      <dc:creator>bosseres</dc:creator>
      <dc:date>2021-12-16T11:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578627#M201662</link>
      <description>&lt;P&gt;It will look like the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=YOURINDEXHERE
| regex Commandline="(regex1|regex2.*regex3)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I could be wrong as I still don't know what sort of regex you want to write or what kind of string you want to match. Hope it helps anyway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 12:00:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/578627#M201662</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2021-12-16T12:00:29Z</dc:date>
    </item>
  </channel>
</rss>

