<?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 some basic REGEX please? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503267#M140013</link>
    <description>&lt;P&gt;either I'm using this incorrectly, or its not working, here is the full string in the database:&lt;/P&gt;

&lt;P&gt;172.69.63.125 - - [28/Oct/2019:20:40:58 -0500] "POST /emby/Sessions/Playing/Progress HTTP/1.1" 204 0 "-" "Dalvik/2.1.0 (Linux; U; Android 7.1.2; AFTMM Build/NS6266)" "2601:243:ca80:35ce:31dc:3f3f:5f8e:3718&lt;BR /&gt;
forwarded_for&lt;BR /&gt;
" 0.042 443 "MediaBrowser Client=\x22AndroidTv\x22, DeviceId=\x22dec6c5313ff588a2\x22, Device=\x22Bedroom TV\x22, Version=\x221.7.53a\x22, UserId=\x22e76db24xxxxxxxxxxxxd7a988641618\x22"&lt;/P&gt;

&lt;P&gt;i want to extract a Field using regex,    i would like out of the above string "1.7.53a" for field Version          Various versions exist, one could be 4.3.0.15   or  1.7.53   or  1.7.53a   etc...    so basically in the above access log i want to grab that version field and get rid of the \x22 on each side of the version number. &lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2019 01:49:35 GMT</pubDate>
    <dc:creator>pir8radio</dc:creator>
    <dc:date>2019-10-29T01:49:35Z</dc:date>
    <item>
      <title>Help with some basic REGEX please?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503264#M140010</link>
      <description>&lt;P&gt;In this string:  Version=\x221.7.53a\x22&lt;BR /&gt;
I want to capture everything in between \x22     and \x22      so the result on this string would be 1.7.53a&lt;BR /&gt;
but some other strings could look like Version=\x224.3.0.15\x22    the result should be 4.3.0.15    &lt;/P&gt;

&lt;P&gt;there are other fields like user=\x22username\x22  that i dont care about, just the version=\x22.........\x22&lt;BR /&gt;
Any help would be appreciated. &lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 03:06:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503264#M140010</guid>
      <dc:creator>pir8radio</dc:creator>
      <dc:date>2019-10-22T03:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with some basic REGEX please?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503265#M140011</link>
      <description>&lt;P&gt;At search time, you can use &lt;CODE&gt;| rex field=Version "\\x22(?&amp;lt;version&amp;gt;[^\\]+)\\22"&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 06:07:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503265#M140011</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-22T06:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with some basic REGEX please?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503266#M140012</link>
      <description>&lt;P&gt;try this :   &lt;CODE&gt;| rex field=Version "\\x22(?&amp;lt;version&amp;gt;.*)\\x22"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 13:44:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503266#M140012</guid>
      <dc:creator>Jawahir</dc:creator>
      <dc:date>2019-10-22T13:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with some basic REGEX please?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503267#M140013</link>
      <description>&lt;P&gt;either I'm using this incorrectly, or its not working, here is the full string in the database:&lt;/P&gt;

&lt;P&gt;172.69.63.125 - - [28/Oct/2019:20:40:58 -0500] "POST /emby/Sessions/Playing/Progress HTTP/1.1" 204 0 "-" "Dalvik/2.1.0 (Linux; U; Android 7.1.2; AFTMM Build/NS6266)" "2601:243:ca80:35ce:31dc:3f3f:5f8e:3718&lt;BR /&gt;
forwarded_for&lt;BR /&gt;
" 0.042 443 "MediaBrowser Client=\x22AndroidTv\x22, DeviceId=\x22dec6c5313ff588a2\x22, Device=\x22Bedroom TV\x22, Version=\x221.7.53a\x22, UserId=\x22e76db24xxxxxxxxxxxxd7a988641618\x22"&lt;/P&gt;

&lt;P&gt;i want to extract a Field using regex,    i would like out of the above string "1.7.53a" for field Version          Various versions exist, one could be 4.3.0.15   or  1.7.53   or  1.7.53a   etc...    so basically in the above access log i want to grab that version field and get rid of the \x22 on each side of the version number. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 01:49:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503267#M140013</guid>
      <dc:creator>pir8radio</dc:creator>
      <dc:date>2019-10-29T01:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help with some basic REGEX please?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503268#M140014</link>
      <description>&lt;P&gt;I think you meant &lt;CODE&gt;| rex field=Version "\\x22(?&amp;lt;version&amp;gt;[^\\]+)\\x22"&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;
You missed the x at the end &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 10:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503268#M140014</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-10-29T10:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with some basic REGEX please?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503269#M140015</link>
      <description>&lt;P&gt;Based on the data you posted in @richgalloway Answer, it looks like there are no field extractions on your data. so this is what you probably need&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "Version=\\x22(?&amp;lt;version&amp;gt;[^\\]+)\\x22"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you do have field extractions, @richgalloway 's answer is right except for a small error. there's a missing x at the end. so this is what you need. I posted this as a comment on his answer. If this work's, Please upvote his answer and mark this as the answer&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=Version "\\x22(?&amp;lt;version&amp;gt;[^\\]+)\\x22"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Oct 2019 11:59:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503269#M140015</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-10-29T11:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with some basic REGEX please?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503270#M140016</link>
      <description>&lt;P&gt;Escaping backlashes with rex is strange.  You could use three slashes:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "Version=\\\x22(?&amp;lt;Version&amp;gt;.*?)\\\x"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or use \x5c:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "Version=\x5cx22(?&amp;lt;Version&amp;gt;.*?)\x5cx"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Oct 2019 20:21:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-some-basic-REGEX-please/m-p/503270#M140016</guid>
      <dc:creator>wenthold</dc:creator>
      <dc:date>2019-10-30T20:21:01Z</dc:date>
    </item>
  </channel>
</rss>

