<?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 wether or is possible inside a regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/wether-or-is-possible-inside-a-regex/m-p/46711#M11164</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;A1.abc-ab.1000.11111
A1.ab.1000.11111
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the format of data what iam trying to extract using regex.Since both the datas are values of same instance i want to exctract these both values using 1 regex so as to compare it with other values&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=_raw "(?&amp;lt;value&amp;gt;(\w\d\.\w+\-\w+\.\d{4}\-\d{8})|(\w\d\.\w+\.\d{4}\.d{7}))"| table value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this is what i have tried but it is fetching only the data matching with the first bracket ie A1.abc-ab.1000.11111 .Please help&lt;/P&gt;</description>
    <pubDate>Wed, 09 May 2012 10:01:33 GMT</pubDate>
    <dc:creator>john</dc:creator>
    <dc:date>2012-05-09T10:01:33Z</dc:date>
    <item>
      <title>wether or is possible inside a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/wether-or-is-possible-inside-a-regex/m-p/46711#M11164</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;A1.abc-ab.1000.11111
A1.ab.1000.11111
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the format of data what iam trying to extract using regex.Since both the datas are values of same instance i want to exctract these both values using 1 regex so as to compare it with other values&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=_raw "(?&amp;lt;value&amp;gt;(\w\d\.\w+\-\w+\.\d{4}\-\d{8})|(\w\d\.\w+\.\d{4}\.d{7}))"| table value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this is what i have tried but it is fetching only the data matching with the first bracket ie A1.abc-ab.1000.11111 .Please help&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2012 10:01:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/wether-or-is-possible-inside-a-regex/m-p/46711#M11164</guid>
      <dc:creator>john</dc:creator>
      <dc:date>2012-05-09T10:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: wether or is possible inside a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/wether-or-is-possible-inside-a-regex/m-p/46712#M11165</link>
      <description>&lt;P&gt;There are a couple of errors in your regex, and you're probably making it too complicated. &lt;CODE&gt;\w&lt;/CODE&gt; also matches digits, and you're missing the backslash for the last &lt;CODE&gt;\d&lt;/CODE&gt;. Using character classes ([]) simplifies a lot.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=_raw "\s(?&amp;lt;value&amp;gt;[\w]+\.[\w-]+\.\d+\.\d+)\s"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;should do it. Note that this may also capture other stuff in your log. Please post some a couple of log events to get better answers.&lt;/P&gt;

&lt;P&gt;Hope this helps, &lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2012 10:36:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/wether-or-is-possible-inside-a-regex/m-p/46712#M11165</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-05-09T10:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: wether or is possible inside a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/wether-or-is-possible-inside-a-regex/m-p/46713#M11166</link>
      <description>&lt;P&gt;updated. /k&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2012 10:43:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/wether-or-is-possible-inside-a-regex/m-p/46713#M11166</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-05-09T10:43:38Z</dc:date>
    </item>
  </channel>
</rss>

