<?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: Is there any way of searching for any character follow by comma using rex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232178#M68858</link>
    <description>&lt;P&gt;Does "any character" include commas too?&lt;/P&gt;

&lt;P&gt;If not, you can possibly do it like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"[^\,]+\,"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which reads as 1 or more non-comma characters followed by a comma.&lt;/P&gt;

&lt;P&gt;You can then group all of that in a token you want to capture, and problem solved.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "(?&amp;lt;fieldnameFoo&amp;gt;[^\,]+)\,"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
J&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2017 11:44:52 GMT</pubDate>
    <dc:creator>javiergn</dc:creator>
    <dc:date>2017-01-18T11:44:52Z</dc:date>
    <item>
      <title>Is there any way of searching for any character follow by comma using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232177#M68857</link>
      <description>&lt;P&gt;Does splunk rex have a concept of doing a .*, in the rex function?  I basically want to search for any character followed by a comma.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 11:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232177#M68857</guid>
      <dc:creator>rajivchadha</dc:creator>
      <dc:date>2017-01-18T11:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way of searching for any character follow by comma using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232178#M68858</link>
      <description>&lt;P&gt;Does "any character" include commas too?&lt;/P&gt;

&lt;P&gt;If not, you can possibly do it like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"[^\,]+\,"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which reads as 1 or more non-comma characters followed by a comma.&lt;/P&gt;

&lt;P&gt;You can then group all of that in a token you want to capture, and problem solved.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "(?&amp;lt;fieldnameFoo&amp;gt;[^\,]+)\,"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 11:44:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232178#M68858</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2017-01-18T11:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way of searching for any character follow by comma using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232179#M68859</link>
      <description>&lt;P&gt;In regex . stands for any character and \, stands for comma.&lt;/P&gt;

&lt;P&gt;So &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | rex (?&amp;lt;anyChar&amp;gt;.)\, 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Should work&lt;/P&gt;

&lt;P&gt;However if you're not wanting to extract the field and instead you're just searching for it, use the regex command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   | regex .\,
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Jan 2017 12:13:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232179#M68859</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-01-18T12:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way of searching for any character follow by comma using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232180#M68860</link>
      <description>&lt;P&gt;Thanks.  I tried what you suggested and it worked.  &lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 12:29:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232180#M68860</guid>
      <dc:creator>rajivchadha</dc:creator>
      <dc:date>2017-01-18T12:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way of searching for any character follow by comma using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232181#M68861</link>
      <description>&lt;P&gt;I tried the rex command like below and it did not work as per your suggestion&lt;/P&gt;

&lt;P&gt;index="md_dev"  ( "Subscribe for") | rex max_match=0 "(?identifier=.*\,)"&lt;/P&gt;

&lt;P&gt;also tried &lt;/P&gt;

&lt;P&gt;index="md_dev"  ( "Subscribe for") | rex max_match=0 "(?identifier=[.]*\,)"&lt;/P&gt;

&lt;P&gt;which did not work&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:24:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-way-of-searching-for-any-character-follow-by-comma/m-p/232181#M68861</guid>
      <dc:creator>rajivchadha</dc:creator>
      <dc:date>2020-09-29T12:24:26Z</dc:date>
    </item>
  </channel>
</rss>

