<?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 merge two regex in single query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-regex-in-single-query/m-p/626370#M217707</link>
    <description>&lt;P&gt;Hello Rakzskull,&lt;/P&gt;&lt;P&gt;you can just combine two regex strings into one like everywhere else.&lt;/P&gt;&lt;P&gt;Easy example in your internal data would be&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal | regex _raw="^(\d{2,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s-\s(splunk-system-user)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;If it does not work like expected please provide some example data and your regex strings.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2023 07:46:55 GMT</pubDate>
    <dc:creator>PaulPanther</dc:creator>
    <dc:date>2023-01-09T07:46:55Z</dc:date>
    <item>
      <title>How to merge two regex in single query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-regex-in-single-query/m-p/626361#M217702</link>
      <description>&lt;P&gt;I'd want to merge two regex strings into a single one; any suggestions would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Reference Search Query -&lt;/P&gt;&lt;P&gt;index=* sourcetype=XYZ "&amp;lt;ABC2&amp;gt;" "&amp;lt;ABC1&amp;gt;"&lt;/P&gt;&lt;P&gt;| regex _raw="&amp;lt;ABC1&amp;gt;[^\x00-\x7F]"&lt;BR /&gt;| regex _raw="&amp;lt;ABC2&amp;gt;[^\x00-\x7F]"&lt;/P&gt;&lt;P&gt;Thanks in advance. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 06:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-regex-in-single-query/m-p/626361#M217702</guid>
      <dc:creator>Rakzskull</dc:creator>
      <dc:date>2023-01-09T06:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge two regex in single query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-regex-in-single-query/m-p/626370#M217707</link>
      <description>&lt;P&gt;Hello Rakzskull,&lt;/P&gt;&lt;P&gt;you can just combine two regex strings into one like everywhere else.&lt;/P&gt;&lt;P&gt;Easy example in your internal data would be&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal | regex _raw="^(\d{2,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s-\s(splunk-system-user)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;If it does not work like expected please provide some example data and your regex strings.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 07:46:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-regex-in-single-query/m-p/626370#M217707</guid>
      <dc:creator>PaulPanther</dc:creator>
      <dc:date>2023-01-09T07:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge two regex in single query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-regex-in-single-query/m-p/626376#M217710</link>
      <description>&lt;P&gt;If you know the order of ABC1 and ABC2 and you only want events where both start with a character outside the range then you could try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* sourcetype=XYZ "&amp;lt;ABC2&amp;gt;" "&amp;lt;ABC1&amp;gt;"

| regex _raw="&amp;lt;ABC1&amp;gt;[^\x00-\x7F].+&amp;lt;ABC2&amp;gt;[^\x00-\x7F]"&lt;/LI-CODE&gt;&lt;P&gt;If you need either order, you could try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* sourcetype=XYZ "&amp;lt;ABC2&amp;gt;" "&amp;lt;ABC1&amp;gt;"

| regex _raw="(&amp;lt;ABC1&amp;gt;[^\x00-\x7F].+&amp;lt;ABC2&amp;gt;[^\x00-\x7F]|&amp;lt;ABC2&amp;gt;[^\x00-\x7F].+&amp;lt;ABC1&amp;gt;[^\x00-\x7F])"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Or if you want events where either start with a character outside the range&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* sourcetype=XYZ "&amp;lt;ABC2&amp;gt;" "&amp;lt;ABC1&amp;gt;"

| regex _raw="(&amp;lt;ABC1&amp;gt;[^\x00-\x7F]|&amp;lt;ABC2&amp;gt;[^\x00-\x7F])"&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 09 Jan 2023 08:58:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-regex-in-single-query/m-p/626376#M217710</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-01-09T08:58:31Z</dc:date>
    </item>
  </channel>
</rss>

