<?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: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188696#M54360</link>
    <description>&lt;P&gt;Ah that's not good at all, thanks for letting me know. Let me look into it and I'll get back to you. (are you "Rich" in the IRC #splunk channel? If yes, I pinged ya earlier to chat about this, but wasn't sure if that was you lol)&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jan 2015 20:49:25 GMT</pubDate>
    <dc:creator>ppablo</dc:creator>
    <dc:date>2015-01-21T20:49:25Z</dc:date>
    <item>
      <title>What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188691#M54355</link>
      <description>&lt;P&gt;I have the following excerpt of exchange logs.  There are more fields before and after this excerpt.&lt;/P&gt;

&lt;P&gt;,&lt;A href="mailto:awells@atcorp.com" target="_blank"&gt;awells@atcorp.com&lt;/A&gt;,&lt;A href="mailto:awells@atcorp.com" target="_blank"&gt;awells@atcorp.com&lt;/A&gt;,Hi, my dear friend!,&lt;/P&gt;

&lt;P&gt;The regex I have developed is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;,(?P[^,]*|,),(?P[^,]*|,),(?P[^,]*|,),]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Using comma (,) as a field delimiter &lt;/P&gt;

&lt;P&gt;The first field "sender_address"  is parsed as "&lt;A href="mailto:awells@atcorp.com" target="_blank"&gt;awells@atcorp.com&lt;/A&gt;" - the desired result &lt;BR /&gt;
The 2nd field "return_path"  is parsed as "&lt;A href="mailto:awells@atcorp.com" target="_blank"&gt;awells@atcorp.com&lt;/A&gt;" -  the desired result &lt;BR /&gt;
The 3rd field "message_subject"  is parsed as "Hi,"  but  it should be "Hi, my dear friend!"&lt;/P&gt;

&lt;P&gt;I observed that a comma followed by character is field delimiter, but a comma followed by blank space is not.&lt;BR /&gt;
Question:  what is a correct regex for the 3rd field? &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:39:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188691#M54355</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2020-09-28T18:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188692#M54356</link>
      <description>&lt;P&gt;The complete regex should be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;,(?P[^,]*|,),(?P[^,]*|,),(?P[^,]*|,),]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Somehow it was modified during the posting.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 19:59:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188692#M54356</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2015-01-21T19:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188693#M54357</link>
      <description>&lt;P&gt;Can the field delimiter be changed?  Is there another way to determine the end of field 3 (keyword, etc.)?  Can fields be enclosed in quotes?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 20:05:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188693#M54357</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-01-21T20:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188694#M54358</link>
      <description>&lt;P&gt;Just edited your post and comment so your regex renders correctly on this site. &lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 20:18:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188694#M54358</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-01-21T20:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188695#M54359</link>
      <description>&lt;P&gt;I used to have that ability until the site was upgraded.  How do I get it back?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 20:21:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188695#M54359</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-01-21T20:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188696#M54360</link>
      <description>&lt;P&gt;Ah that's not good at all, thanks for letting me know. Let me look into it and I'll get back to you. (are you "Rich" in the IRC #splunk channel? If yes, I pinged ya earlier to chat about this, but wasn't sure if that was you lol)&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 20:49:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188696#M54360</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-01-21T20:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188697#M54361</link>
      <description>&lt;P&gt;No, not me.  I don't use IRC.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 20:50:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188697#M54361</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-01-21T20:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188698#M54362</link>
      <description>&lt;P&gt;Ah ok haha woops. Well just to get more info, you haven't been able to edit other users' posts since this site was updated back in September?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 20:58:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188698#M54362</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-01-21T20:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188699#M54363</link>
      <description>&lt;P&gt;That's correct.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 20:59:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188699#M54363</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-01-21T20:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188700#M54364</link>
      <description>&lt;P&gt;This regex appears to work as you want, and should work as long as there is a comma at the end of field three:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;,(?&amp;lt;Field1&amp;gt;[^,]+),(?&amp;lt;Field2&amp;gt;[^,]+),(?&amp;lt;Field3&amp;gt;.*),
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Jan 2015 21:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188700#M54364</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2015-01-21T21:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188701#M54365</link>
      <description>&lt;P&gt;I tested and your solution does not work.  The example string is listed below&lt;BR /&gt;
,&lt;A href="mailto:awells@atcorp.com"&gt;awells@atcorp.com&lt;/A&gt;,&lt;A href="mailto:awells@atcorp.com"&gt;awells@atcorp.com&lt;/A&gt;,Hi, my dear friend! ,&lt;/P&gt;

&lt;P&gt;Focusing on the 3rd field, the last two characters include a space between the ! ,  (exchamation mark + space + comma)&lt;BR /&gt;
The field separator at the end of the 3rd field should be a space+comma.  I have tried this &lt;/P&gt;

&lt;P&gt;,(?[^,]+),(?[^,]+),(?.&lt;EM&gt;)\s,       it does not work  but&lt;BR /&gt;
 ,(?[^,]+),(?[^,]+),(?.&lt;/EM&gt;|\s),    does&lt;/P&gt;

&lt;P&gt;I do not understand why the first one does not work as the field separator is  a space+comma&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2015 17:41:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188701#M54365</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2015-01-22T17:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188702#M54366</link>
      <description>&lt;P&gt;Correction&lt;/P&gt;

&lt;P&gt;,(?[^,]+),(?[^,]+),(?.)\s, it does not work but&lt;BR /&gt;
,(?[^,]+),(?[^,]+),(?.|\s), does&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2015 17:49:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188702#M54366</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2015-01-22T17:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188703#M54367</link>
      <description>&lt;P&gt;there is backward slash before the s&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2015 17:50:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188703#M54367</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2015-01-22T17:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188704#M54368</link>
      <description>&lt;P&gt;If the third field &lt;EM&gt;always&lt;/EM&gt; ends with space+comma then this works for me:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;,(?&amp;lt;field1&amp;gt;[^,]+),(?&amp;lt;field2&amp;gt;[^,]+),(?&amp;lt;field3&amp;gt;.+) ,
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jan 2015 18:08:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188704#M54368</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-01-22T18:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188705#M54369</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;

&lt;P&gt;What is the difference between " " (blank space) and \s  embedded in regex statements?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2015 19:12:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188705#M54369</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2015-01-22T19:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regex for a comma followed by a character as a field delimiter, but a comma followed by blank space is not?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188706#M54370</link>
      <description>&lt;P&gt;&lt;CODE&gt;\s&lt;/CODE&gt; matches any white space (space, tab, etc.) whereas ' ' matches only space.  &lt;CODE&gt;\s&lt;/CODE&gt; is probably best practice.  In your case, they should be interchangeable.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2015 19:17:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regex-for-a-comma-followed-by-a-character-as-a-field/m-p/188706#M54370</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-01-22T19:17:46Z</dc:date>
    </item>
  </channel>
</rss>

