<?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: Using rex simple-xml with javascript extensions in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140512#M12056</link>
    <description>&lt;P&gt;Sorry I forgot to added the double backslash.  The part that having problems is the rex extraction.  It does nots like the html encoding of the greater/ less than symbols or the symbol.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jul 2014 23:24:56 GMT</pubDate>
    <dc:creator>bmacias84</dc:creator>
    <dc:date>2014-07-14T23:24:56Z</dc:date>
    <item>
      <title>Using rex simple-xml with javascript extensions</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140509#M12053</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am running into a problem where I am attempting to use rex command similar to the Custom Chart Overlay in Simple XML examples.&lt;/P&gt;

&lt;P&gt;I know my search works in simple xml.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
earliest=-2hr latest=now&lt;BR /&gt;
| fields time_taken, cs_uri_stem, sc_status&lt;BR /&gt;
| rex field=sc_status \"(?&amp;lt;200&amp;gt;2\d\d)\"&lt;BR /&gt;
 |rex field=sc_status \"(?&amp;lt;300&amp;gt;3\d\d)\"&lt;BR /&gt;
| rex field=sc_status \"(?&amp;lt;400&amp;gt;4\d\d)\"&lt;BR /&gt;
| rex field=sc_status \"(?&amp;lt;500&amp;gt;5\d\d)\"&lt;BR /&gt;
| rex field=cs_uri_stem \"(?&amp;lt;uri&amp;gt;/[\w\d]{0,13})\"&lt;BR /&gt;
| eval uri=lower(uri) |bucket _time span=2m&lt;BR /&gt;
| stats count(200) as 200, count(300) as 300, count(400) as 400, count(500) as 500, avg(time_taken) as AvgTime by _time uri&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;but in the following it doesnt&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
            &amp;lt;div id="base-search"&lt;BR /&gt;
                 class="splunk-manager"&lt;BR /&gt;
                 data-require="splunkjs/mvc/searchmanager"&lt;BR /&gt;
                 data-options='{&lt;BR /&gt;
                    "earliest_time": "-2@h",&lt;BR /&gt;
                    "latest_time": "now",&lt;BR /&gt;
                    "cache": "60",&lt;BR /&gt;
                    "search": ".... earliest=-2hr latest=now&lt;BR /&gt;
                                | fields time_taken, cs_uri_stem, sc_status&lt;BR /&gt;
                                | rex field=sc_status \"(?&amp;amp;lt ;200&amp;amp;gt ;2\d\d)\"&lt;BR /&gt;
                                | rex field=sc_status \"(?&amp;amp;lt ;300&amp;amp;gt ;3\d\d)\"&lt;BR /&gt;
                                | rex field=sc_status \"(?&amp;amp;lt ;400&amp;amp;gt ;4\d\d)\"&lt;BR /&gt;
                                | rex field=sc_status \"(?&amp;amp;lt ;500&amp;amp;gt ;5\d\d)\"&lt;BR /&gt;
                                | rex field=cs_uri_stem \"(?&amp;amp;lt ;uri&amp;amp;gt ;/[\w\d]{0,13})\"&lt;BR /&gt;
                                | eval uri=lower(uri) |bucket _time span=2m&lt;BR /&gt;
                                | stats count(200) as 200, count(300) as 300, count(400) as 400, count(500) as 500, avg(time_taken) as AvgTime by _time uri"&lt;BR /&gt;
                 }'&amp;gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;What gives?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2014 23:30:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140509#M12053</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2014-07-13T23:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using rex simple-xml with javascript extensions</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140510#M12054</link>
      <description>&lt;P&gt;Make sure you either escape the double quotes within the search string or use single quotes around it instead.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2014 23:34:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140510#M12054</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-13T23:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using rex simple-xml with javascript extensions</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140511#M12055</link>
      <description>&lt;P&gt;Use a backslash to escape the double quotes.&lt;BR /&gt;
Single quotes don't work because of "data-options" which is already quoted with singles.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2014 20:30:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140511#M12055</guid>
      <dc:creator>mathu</dc:creator>
      <dc:date>2014-07-14T20:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using rex simple-xml with javascript extensions</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140512#M12056</link>
      <description>&lt;P&gt;Sorry I forgot to added the double backslash.  The part that having problems is the rex extraction.  It does nots like the html encoding of the greater/ less than symbols or the symbol.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2014 23:24:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140512#M12056</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2014-07-14T23:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using rex simple-xml with javascript extensions</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140513#M12057</link>
      <description>&lt;P&gt;can you post the resulting search (from the job inspector)?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2014 05:50:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140513#M12057</guid>
      <dc:creator>mathu</dc:creator>
      <dc:date>2014-07-15T05:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using rex simple-xml with javascript extensions</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140514#M12058</link>
      <description>&lt;P&gt;I would post the job inspector, but as soon I add regex it never makes it to the search manager.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2014 16:06:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140514#M12058</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2014-07-17T16:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using rex simple-xml with javascript extensions</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140515#M12059</link>
      <description>&lt;P&gt;mathu has it, you have to use a backslash to escape the double quotes.&lt;/P&gt;

&lt;P&gt;I also had to escape the existing backslashes in my regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=cst_ls_segment \"LS\\d+\\s+(?&amp;amp;lt;segment&amp;amp;gt;.*)\"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;Luke.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2015 02:23:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Using-rex-simple-xml-with-javascript-extensions/m-p/140515#M12059</guid>
      <dc:creator>lukeh</dc:creator>
      <dc:date>2015-03-24T02:23:42Z</dc:date>
    </item>
  </channel>
</rss>

