<?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: Support for string manipulation and pattern matching in Arcade in ArcGIS Arcade Questions</title>
    <link>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683755#M114</link>
    <description>&lt;P&gt;You can also use the following:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;vr G = Geometry($feature) ; var Paths = G.paths:
for( var p in Paths ){ var lastpnt = p[-1] ; console(lastpnt ) }&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 11 Feb 2026 19:19:13 GMT</pubDate>
    <dc:creator>RPGIS</dc:creator>
    <dc:date>2026-02-11T19:19:13Z</dc:date>
    <item>
      <title>Support for string manipulation and pattern matching in Arcade</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683741#M112</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Given a string representation of a Esri polyline feature:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{"paths":[[[-86.762566,36.180317],[-86.760232,36.184474],[-86.75721,36.186857],[-86.75467,36.188519],[-86.752679,36.194005]]],"spatialReference":{"wkid":4326}}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Is there an Arcade expression which supports pattern matching similar to Regular Expression pattern matching?&amp;nbsp; I want to parse the JSON string and extract the longitude value (&lt;FONT face="lucida sans unicode,lucida sans" size="2" color="#993366"&gt;-86.762566&lt;/FONT&gt;) and the latitude value (&lt;FONT face="lucida sans unicode,lucida sans" size="2" color="#993366"&gt;36.180317&lt;/FONT&gt;) as separate&amp;nbsp;&lt;EM&gt;Double&lt;/EM&gt; values from the first coordinate pair of the polyline. Similarly, I need to parse the string to locate the last coordinate pair and extract the longitude and latitude values for the point at the other end of the polyline. The coordinate values in the JSON string will not always have the same number of significant decimals. Also, the polyline will not always have the same number of vertices.&lt;/P&gt;&lt;P&gt;Finally, while the coordinate values in the example above are all in North America, that cannot be assumed. The pattern match cannot, for example, assume the longitude will always be negative and the latitude will always be positive.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 18:47:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683741#M112</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2026-02-11T18:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Support for string manipulation and pattern matching in Arcade</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683750#M113</link>
      <description>&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/developers-ideas/arcade-regular-expression-support/idi-p/1180076" target="_blank"&gt;Arcade: Regular Expression Support - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would probably use&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#fromjson" target="_self"&gt;FromJSON&lt;/A&gt;&amp;nbsp;and then traverse over the resulting dictionary.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 19:11:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683750#M113</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2026-02-11T19:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Support for string manipulation and pattern matching in Arcade</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683755#M114</link>
      <description>&lt;P&gt;You can also use the following:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;vr G = Geometry($feature) ; var Paths = G.paths:
for( var p in Paths ){ var lastpnt = p[-1] ; console(lastpnt ) }&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 11 Feb 2026 19:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683755#M114</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2026-02-11T19:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Support for string manipulation and pattern matching in Arcade</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683771#M115</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/458875"&gt;@AlfredBaldenweck&lt;/a&gt;&amp;nbsp;for your quick reply.&amp;nbsp; Expressions like those below give me the access I need to the elements in the JSON.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;var d = fromJSON('{"paths":[[[-86.762566,36.180317],[-86.760232,36.184474],[-86.75721,36.186857],[-86.75467,36.188519],[-86.752679,36.194005]]],"spatialReference":{"wkid":4326}}')
var pFirst = First(d.paths[0])
var pLast = First(Reverse(d.paths[0]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 19:38:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683771#M115</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2026-02-11T19:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Support for string manipulation and pattern matching in Arcade</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683805#M116</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/22623"&gt;@RPGIS&lt;/a&gt;&amp;nbsp;... unless I'm doing something wrong, though, the&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/#geometry" target="_self"&gt;Geometry&lt;/A&gt; and&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/#polyline" target="_self"&gt;Polyline&lt;/A&gt;&amp;nbsp;functions do not accept my JSON string. It seems like the specified&amp;nbsp;&lt;FONT face="lucida sans unicode,lucida sans" size="2"&gt;"spatialReference":{"wkid":4326}&lt;/FONT&gt;&amp;nbsp;is not supported. Cross reference&amp;nbsp;&lt;LI-MESSAGE title="Arcade Geometry Function not working" uid="24222" url="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-geometry-function-not-working/m-p/24222#U24222" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I remove the spatial reference from the JSON string Arcade will construct a Geometry which assumes WKID 3857. That does not interfere with pulling coordinate values out as&amp;nbsp;&lt;EM&gt;Double&lt;/EM&gt;. But it does feel odd specifying a Geometry without a spatial reference and allowing Arcade to assume an incorrect default.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var G = Geometry({"paths":[[[-86.762566,36.180317],[-86.760232,36.184474],[-86.75721,36.186857],[-86.75467,36.188519],[-86.752679,36.194005]]],"spatialReference":{"wkid":102100}})
var Paths = G.paths

for (var i=0; i &amp;lt; Count(Paths[0]); i++)
  { Console( "Longitude: " + Paths[0][i].y + ' / ' + "Latitude: " + Paths[0][i].x); }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 20:53:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/support-for-string-manipulation-and-pattern/m-p/1683805#M116</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2026-02-11T20:53:06Z</dc:date>
    </item>
  </channel>
</rss>

