<?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: Rest API quote escape in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Rest-API-quote-escape/m-p/583042#M203033</link>
    <description>&lt;P&gt;The "bash:" portion of the error message indicates this is a shell problem rather than a Splunk problem.&amp;nbsp; It would help to see the complete CLI command, but I suspect you just need to put quotation marks around the entire search command (and escape quotation marks within it).&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jan 2022 01:03:50 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-01-31T01:03:50Z</dc:date>
    <item>
      <title>Rest API quote escape</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rest-API-quote-escape/m-p/583039#M203031</link>
      <description>&lt;P&gt;Hi guys&lt;/P&gt;&lt;P&gt;I'm trying to run a search to the /jobs endpoint. however I get a&amp;nbsp;&lt;/P&gt;&lt;P&gt;bash: syntax error near unexpected token `('&lt;/P&gt;&lt;P&gt;error message.&lt;/P&gt;&lt;P&gt;my search has quotes in it for a | rex command and I tried escaping the quotes with the \ but is till seem to get the issue. when using the \ I get a&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;msg type="ERROR"&amp;gt;Unparsable URI-encoded request data&amp;lt;/msg&amp;gt;&lt;/P&gt;&lt;P&gt;error.&lt;/P&gt;&lt;P&gt;My search is structured as follows:&lt;/P&gt;&lt;P&gt;|&amp;nbsp; tstats summariesonly=1 values(&amp;lt;values&amp;gt;) ....(there are a lot of these) from datamodel=&amp;lt;name&amp;gt; WHERE (some values for the previous section) | lookup &amp;lt;lookup&amp;gt; | rex field=&amp;lt;name&amp;gt; "(?&amp;lt;new field name&amp;gt;[^.]{9}$)" ...&amp;nbsp;&lt;/P&gt;&lt;P&gt;there are about 4 lookups in total and 2 rex command. however when i try to escape in the rex command I get the Unparsebale URI error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anybody come across this error before?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jan 2022 23:03:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rest-API-quote-escape/m-p/583039#M203031</guid>
      <dc:creator>zubairaizatron</dc:creator>
      <dc:date>2022-01-30T23:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Rest API quote escape</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rest-API-quote-escape/m-p/583042#M203033</link>
      <description>&lt;P&gt;The "bash:" portion of the error message indicates this is a shell problem rather than a Splunk problem.&amp;nbsp; It would help to see the complete CLI command, but I suspect you just need to put quotation marks around the entire search command (and escape quotation marks within it).&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 01:03:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rest-API-quote-escape/m-p/583042#M203033</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-31T01:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rest API quote escape</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rest-API-quote-escape/m-p/583049#M203037</link>
      <description>&lt;P&gt;Parenthesis are special characters in bash. You can escape with \&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;| rex field=&amp;lt;name&amp;gt; "\(?&amp;lt;new field name&amp;gt;[^.]{9}$\&lt;/SPAN&gt;&lt;SPAN&gt;)" ...&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Or encapsulate the entire SPL with single quote '&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 06:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rest-API-quote-escape/m-p/583049#M203037</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-01-31T06:18:27Z</dc:date>
    </item>
  </channel>
</rss>

