<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>extract data from string</title><link>https://community.appian.com/discussions/f/general/30529/extract-data-from-string</link><description>hi, 
 i want to know is there any way we can extract data from this kind of string. 
 &amp;quot; [place_id:519fcdaacfd556c0bf591a4bfd61f0c04940f00101f9014600010000000000c002089203064c6f6e646f6e,address_line1:London,city:London,address_line2:ENG, United Kingdom</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: extract data from string</title><link>https://community.appian.com/thread/121319?ContentTypeID=1</link><pubDate>Fri, 03 Nov 2023 12:39:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cd8bcbf0-c215-4126-a534-c319b65b25a8</guid><dc:creator>Mudit_Sharma</dc:creator><description>&lt;p&gt;Hi ,&lt;br /&gt;&lt;br /&gt;I am not sure, from where are you getting the input, and if the keys would always be same or different.&amp;nbsp;&lt;br /&gt;Considering the input, keys and format same,&lt;br /&gt;You can try the below code&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  /*The string input*/
  local!string: &amp;quot;[place_id:519fcdaacfd556c0bf591a4bfd61f0c04940f00101f9014600010000000000c002089203064c6f6e646f6e,address_line1:London,city:London,address_line2:ENG, United Kingdom,country:United Kingdom,state:England,county:Greater London,formatted:London, ENG, United Kingdom]&amp;quot;,
  /*The Keys*/
  local!keys: {
    &amp;quot;place_id&amp;quot;,
    &amp;quot;address_line1&amp;quot;,
    &amp;quot;city&amp;quot;,
    &amp;quot;address_line2&amp;quot;,
    &amp;quot;country&amp;quot;,
    &amp;quot;state&amp;quot;,
    &amp;quot;county&amp;quot;,
    &amp;quot;formatted&amp;quot;
  },
  /*Removing the [ , ]*/
  local!strippedString: stripwith(local!string, &amp;quot;[]&amp;quot;),
  /*Storing the patterns in a variable*/
  local!patterns: {
    &amp;quot;place_id:[^,]+&amp;quot;,
    &amp;quot;address_line1:[^,]+&amp;quot;,
    &amp;quot;city:[^,]+&amp;quot;,
    &amp;quot;address_line2:[^,]+,[^,]+,&amp;quot;,
    &amp;quot;country:[^,]+&amp;quot;,
    &amp;quot;state:[^,]+&amp;quot;,
    &amp;quot;county:[^,]+&amp;quot;,
    &amp;quot;formatted:[^,]+,[^,]+,[^,]+&amp;quot;
  },
  local!subStrings: a!flatten(
    a!forEach(
      items: local!patterns,
      expression: regexsearch(
        pattern: fv!item,
        searchString: local!strippedString,
        regexFlags: &amp;quot;g&amp;quot;
      ).match,

    )
  ),
  createdictionary(
    local!keys,
    a!flatten(
      a!forEach(
        items: local!keys,
        expression: keyval(
          local!subStrings[fv!index],
          fv!item,
          &amp;quot;:&amp;quot;,
          &amp;quot;&amp;quot;
        )
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: extract data from string</title><link>https://community.appian.com/thread/121311?ContentTypeID=1</link><pubDate>Fri, 03 Nov 2023 09:52:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c3738444-4f2a-4ada-97ad-8c71c70271b9</guid><dc:creator>Akankshi | Xebia</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a class="internal-link view-user-profile" href="/members/thiliniu0001"&gt;Umesha K.A.T&lt;/a&gt;,&lt;br /&gt;you can utilize replace function to format existing string together with&amp;nbsp;&lt;span&gt;keyval(&amp;quot;hello=alpha][goodbye=beta]&amp;quot;, {&amp;quot;hello&amp;quot;}, &amp;quot;=&amp;quot;, &amp;quot;]&amp;quot;) to have this as result&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: extract data from string</title><link>https://community.appian.com/thread/121310?ContentTypeID=1</link><pubDate>Fri, 03 Nov 2023 09:38:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ab243a23-f5b2-4f8a-ac90-d7732b50fa96</guid><dc:creator>Sri Ram Kaja</dc:creator><description>&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;Can you tell from where this string is coming?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>