<?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: Meaning of Pathname characters in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/meaning-of-pathname-characters/m-p/758621#M70218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your explanation.&amp;nbsp; I'm having trouble setting the location for my modules.&amp;nbsp; To follow along with your example, what would the regular expression be if your modules were in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;example.com/resources/extras?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jan 2014 15:58:57 GMT</pubDate>
    <dc:creator>NilsBabel</dc:creator>
    <dc:date>2014-01-07T15:58:57Z</dc:date>
    <item>
      <title>Meaning of Pathname characters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/meaning-of-pathname-characters/m-p/758619#M70216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What do each of the pathname characters mean below, from left paren until the comma, i.e. "/\/[^]+$/"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;location.pathname.replace(/\/[^/]+$/, "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 17:53:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/meaning-of-pathname-characters/m-p/758619#M70216</guid>
      <dc:creator>JillMasters</dc:creator>
      <dc:date>2013-06-14T17:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Meaning of Pathname characters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/meaning-of-pathname-characters/m-p/758620#M70217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What a great question. The meat of this question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;/\/[^/]+$/&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is a &lt;/SPAN&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions"&gt;regular expression&lt;/A&gt;&lt;SPAN&gt;. In context, it looks at the &lt;/SPAN&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/window.location"&gt;path relative to the host&lt;/A&gt;&lt;SPAN&gt; and removes everything after the last slash so that an absolute path to a module can be given to the Dojo module loader. The original source for this is the &lt;/SPAN&gt;&lt;A href="http://dojotoolkit.org/documentation/tutorials/1.9/cdn/"&gt;Using Custom Modules with a CDN Dojo tutorial&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's an explanation, piece by piece&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;/&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Start a regular expression.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;\&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Escape character.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;/&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look for a slash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;[^/]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Negated character set to match all characters except slash. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;+&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Match one or more times.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;$&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Match at the end of a string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;/&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End of regular expression.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The purpose of this regular expression is better demonstrated by example. When using custom modules, the Dojo module loader needs to know where to find them. You tell the loader about modules with dojoConfig.packages. Specifically, the location property. So...if your app is running at example.com/maps/usefulStuff.html, and your modules are in example.com/maps/extras, you can use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;location.pathname.replace(/\/[^/]+$/, '') + "/extras"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to correctly tell Dojo where to find your modules but not have to hardcode the full path to your modules.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 18:58:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/meaning-of-pathname-characters/m-p/758620#M70217</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-06-14T18:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Meaning of Pathname characters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/meaning-of-pathname-characters/m-p/758621#M70218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your explanation.&amp;nbsp; I'm having trouble setting the location for my modules.&amp;nbsp; To follow along with your example, what would the regular expression be if your modules were in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;example.com/resources/extras?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:58:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/meaning-of-pathname-characters/m-p/758621#M70218</guid>
      <dc:creator>NilsBabel</dc:creator>
      <dc:date>2014-01-07T15:58:57Z</dc:date>
    </item>
  </channel>
</rss>

