<?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 Regex to remove single quote in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121974#M32824</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;index=whatever* sourcetype=server  earliest=-3d  | table  USERNAME CLIENT_VERSION_IN |where NOT isnull(SU_USERNAME_IN)|where CLIENT_VERSION_IN=*07_2*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;CLIENT_VERSION_IN=*07_2*&lt;/CODE&gt; doesnot seem to work as the value here 'XF_07_2_5474'. Can some one help build a rex or regex so that i could get the data.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:10:48 GMT</pubDate>
    <dc:creator>allladin101</dc:creator>
    <dc:date>2020-09-28T18:10:48Z</dc:date>
    <item>
      <title>Regex to remove single quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121974#M32824</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=whatever* sourcetype=server  earliest=-3d  | table  USERNAME CLIENT_VERSION_IN |where NOT isnull(SU_USERNAME_IN)|where CLIENT_VERSION_IN=*07_2*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;CLIENT_VERSION_IN=*07_2*&lt;/CODE&gt; doesnot seem to work as the value here 'XF_07_2_5474'. Can some one help build a rex or regex so that i could get the data.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:10:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121974#M32824</guid>
      <dc:creator>allladin101</dc:creator>
      <dc:date>2020-09-28T18:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to remove single quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121975#M32825</link>
      <description>&lt;P&gt;Hi alladin101,&lt;/P&gt;

&lt;P&gt;if you want to get something between two &lt;CODE&gt;'&lt;/CODE&gt; single quotes, try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | head 1 | eval foo="'XF_07_2_5474'" | rex field=foo "\'(?P&amp;lt;myfoo&amp;gt;.+)\'" | table foo myfo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and the result will be like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/157i549B15873230309B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2014 06:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121975#M32825</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-11-14T06:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to remove single quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121976#M32826</link>
      <description>&lt;P&gt;this works but i want to use a wild card here  in this part :eval foo="'XF_07_2_5474'" &lt;/P&gt;

&lt;P&gt;as 5474 may vary. Is that possible?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:10:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121976#M32826</guid>
      <dc:creator>allladin101</dc:creator>
      <dc:date>2020-09-28T18:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to remove single quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121977#M32827</link>
      <description>&lt;P&gt;I must admit, I don't fully understand your intensions but sure this will work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval foo="'XF_07_2_*'" | rex field=foo "\'(?P&amp;lt;myfoo&amp;gt;.+)\'" | table foo myfoo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will result in a table looking like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;foo                  myfoo
'XF_07_2_*' XF_07_2_*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Nov 2014 07:23:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121977#M32827</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-11-14T07:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to remove single quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121978#M32828</link>
      <description>&lt;P&gt;can you mark this as answered as well - thx&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2014 08:40:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121978#M32828</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-11-14T08:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to remove single quote</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121979#M32829</link>
      <description>&lt;P&gt;In terms more close to your question, with MuS's reply, use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=whatever* sourcetype=server  earliest=-3d  | table  USERNAME CLIENT_VERSION_IN | rex field=CLIENT_VERSION_IN "\'(?P&amp;lt;fixedfield&amp;gt;.+)\'" | table CLIENT_VERSION_IN fixedfield
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Completely generic for your case as provided.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2014 15:53:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-remove-single-quote/m-p/121979#M32829</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2014-11-14T15:53:18Z</dc:date>
    </item>
  </channel>
</rss>

