<?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>Replace All Occurrences of a Substring in a String</title><link>https://community.appian.com/discussions/f/general/25703/replace-all-occurrences-of-a-substring-in-a-string</link><description>What is the APPIAN&amp;#39;s equivalent for JS String. replaceAll ?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Replace All Occurrences of a Substring in a String</title><link>https://community.appian.com/thread/100598?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 04:20:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5f33b266-555b-4cb4-afb2-fa7d3c25cb6a</guid><dc:creator>rahata9316</dc:creator><description>&lt;p&gt;If you can check if reduce can give this the desired result also. Somewhere in community I read this last time.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
  count(ri!originalValues) &amp;lt;&amp;gt; count(ri!replacementValues),
  ri!inputText,

  reduce(
    fn!substitute,
    ri!inputText,
    merge( ri!originalValues, ri!replacementValues )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replace All Occurrences of a Substring in a String</title><link>https://community.appian.com/thread/100564?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 13:40:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eb0c3c14-698b-42ee-8ee1-83f755cc7cc1</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Appian OOTB &lt;em&gt;substitute()&lt;/em&gt; works fine for any basic use cases as DeepakG already mentioned above.&amp;nbsp; Just chiming in to add, that for more advanced use cases (fuzzy / pattern-matching / etc), you can also use &amp;quot;&lt;em&gt;&lt;strong&gt;regexReplaceAll()&lt;/strong&gt;&lt;/em&gt;&amp;quot; found in the Regex plug-in.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replace All Occurrences of a Substring in a String</title><link>https://community.appian.com/thread/100530?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 04:00:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1e5dc71e-86eb-434f-9543-f4cdd74a1679</guid><dc:creator>deepakg271869</dc:creator><description>&lt;p&gt;you can use substitute function for this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;for example:&amp;nbsp;substitute(&lt;br /&gt; &amp;quot;ACTUAL_TEXT&amp;quot;,&amp;quot;SUB_STRING&amp;quot;,&amp;quot;TO_REPLACE_WITH&amp;quot;&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>