<?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 Field Extraction -- Break Field at Explicit Character in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-Break-Field-at-Explicit-Character/m-p/328027#M97635</link>
    <description>&lt;P&gt;All - I need someone to bring me sanity with a regex I am trying to write.&lt;/P&gt;

&lt;P&gt;Essentially I want to capture everything after "username=" up to either "&amp;amp;" or "\s"&lt;/P&gt;

&lt;P&gt;Two sample events:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Ex. 1&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;username=test%40bmcm%2ecom&amp;amp;version=5%2e4%2e0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Ex. 2&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;username=test%40bmcm%2ecom next_field
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Right now my regex looks like this:&lt;/P&gt;

&lt;P&gt;username=(?P[^&amp;amp;|^s]+)&lt;/P&gt;

&lt;P&gt;Though I can get it to break on spaces, the regex will not break on "&amp;amp;". Can someone tell me where I'm going wrong, I'm sure it's embarrassingly simple!&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2017 17:28:54 GMT</pubDate>
    <dc:creator>himynamesdave</dc:creator>
    <dc:date>2017-09-11T17:28:54Z</dc:date>
    <item>
      <title>Field Extraction -- Break Field at Explicit Character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-Break-Field-at-Explicit-Character/m-p/328027#M97635</link>
      <description>&lt;P&gt;All - I need someone to bring me sanity with a regex I am trying to write.&lt;/P&gt;

&lt;P&gt;Essentially I want to capture everything after "username=" up to either "&amp;amp;" or "\s"&lt;/P&gt;

&lt;P&gt;Two sample events:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Ex. 1&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;username=test%40bmcm%2ecom&amp;amp;version=5%2e4%2e0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Ex. 2&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;username=test%40bmcm%2ecom next_field
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Right now my regex looks like this:&lt;/P&gt;

&lt;P&gt;username=(?P[^&amp;amp;|^s]+)&lt;/P&gt;

&lt;P&gt;Though I can get it to break on spaces, the regex will not break on "&amp;amp;". Can someone tell me where I'm going wrong, I'm sure it's embarrassingly simple!&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:28:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-Break-Field-at-Explicit-Character/m-p/328027#M97635</guid>
      <dc:creator>himynamesdave</dc:creator>
      <dc:date>2017-09-11T17:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction -- Break Field at Explicit Character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-Break-Field-at-Explicit-Character/m-p/328028#M97636</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;username=(?P&amp;lt;username&amp;gt;[^\s&amp;amp;]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From regex101.com:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://regex101.com/r/pNNiop/1"&gt;https://regex101.com/r/pNNiop/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:42:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-Break-Field-at-Explicit-Character/m-p/328028#M97636</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-09-11T17:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction -- Break Field at Explicit Character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-Break-Field-at-Explicit-Character/m-p/328029#M97637</link>
      <description>&lt;P&gt;You are confusing &lt;CODE&gt;character class&lt;/CODE&gt; (which does not need boolean joiners) with string literals (which do need boolean joiners); This should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?ms)username=(?&amp;lt;username&amp;gt;[^&amp;amp;\s]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Sep 2017 05:24:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-Break-Field-at-Explicit-Character/m-p/328029#M97637</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-09-12T05:24:06Z</dc:date>
    </item>
  </channel>
</rss>

