<?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>Find exact text and not contains</title><link>https://community.appian.com/discussions/f/rules/28146/find-exact-text-and-not-contains</link><description>Hello guys, We&amp;#39;re dealing it some issue on attempting this: Right now with find() function or exact() you can&amp;#39;t achieve the following: Let&amp;#39;s say we have an e-mail with this phrase &amp;quot;I am an idealist&amp;quot;, and on the other hand we have a key defined as: &amp;quot;ideal</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Find exact text and not contains</title><link>https://community.appian.com/thread/109818?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 14:29:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a8acd655-6c1b-4e8e-b915-28d06af17862</guid><dc:creator>April Schuppel</dc:creator><description>&lt;p&gt;There is a new plug-in called&amp;nbsp;&lt;a href="/b/appmarket/posts/similarity"&gt;Similarity&lt;/a&gt;&amp;nbsp;that may help. &amp;quot;&lt;span&gt;The Text Similarity function plug-in allows users to compute a similarity score between pairs of texts. By computing a similarity score, one can find related items, group similar items, detect duplicates, and more.&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find exact text and not contains</title><link>https://community.appian.com/thread/109817?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 14:08:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:71259076-e4c2-4944-8f18-91a80f3d4f94</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Or if simply using whereContains()...&lt;br /&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!criterios: split(&amp;quot;teste,teste2,teste3&amp;quot;,&amp;quot;,&amp;quot;),
  local!corpo: split(&amp;quot;ola eu sou o carlos e tenhos teste e teste3&amp;quot;,&amp;quot; &amp;quot;),
  
  /*a!forEach(
    items: local!corpo,
    expression: fn!contains(local!criterios, fv!item)
  )*/
  
  wherecontains(local!criterios, local!corpo)
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1679407729051v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find exact text and not contains</title><link>https://community.appian.com/thread/109816?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 13:56:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bcc6e829-ad25-493f-8844-cc3c5998eb9e</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Not sure if this is what you&amp;#39;re shooting for:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!criterios: split(&amp;quot;teste,teste2,teste3&amp;quot;,&amp;quot;,&amp;quot;),
  local!corpo: split(&amp;quot;ola eu sou o carlos e tenhos teste e teste3&amp;quot;,&amp;quot; &amp;quot;),
  a!forEach(
    items: local!corpo,
    expression: fn!contains(local!criterios, fv!item)
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;which returns:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1679407042513v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find exact text and not contains</title><link>https://community.appian.com/thread/109815?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 13:56:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1ac946c6-d0fe-4e4b-bcfc-fedf27c9edeb</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I&amp;#39;d start with&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;whereContains(local!criterios, local!corpo)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;...which will return an array of matches (indices in the 2nd array where value(s) from the 1st array are a match).&amp;nbsp; If no matches, the returned array will be empty.&amp;nbsp; You can do what you want from there with these results.&lt;/p&gt;
&lt;p&gt;The same result is attainable via a nested a!forEach (as long as you structure it right, i think your examples above are close but both miss the mark somewhat) - but whereContains() does this work for you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find exact text and not contains</title><link>https://community.appian.com/thread/109814?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 13:52:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:46e575c5-1709-4629-93c7-02d774e3cd24</guid><dc:creator>Amaan Shekh</dc:creator><description>&lt;p&gt;you have to match key value word by word for the sentence , here is what you can do to resolve that&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!text:&amp;quot;I am an idealist&amp;quot;,
  local!key:&amp;quot;ideal&amp;quot;,
  local!wordWiseSentance: split(local!text,&amp;quot; &amp;quot;),
  contains(local!wordWiseSentance,local!key)
)
/*returns true means key is present else not present*/&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find exact text and not contains</title><link>https://community.appian.com/thread/109813?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 13:49:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cd304958-e350-4096-83e9-43fad310276d</guid><dc:creator>TiagoMSimoes</dc:creator><description>&lt;p&gt;Just check the java code bellow, basically we wanted to turn that into appian SAIL code.. but we can&amp;#39;t find how we can do a foreach&amp;nbsp;to compare local!corpo and !localcriterios.&lt;br /&gt;&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1679406570735v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find exact text and not contains</title><link>https://community.appian.com/thread/109810?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 13:17:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec778b40-7905-4fa0-bd3a-ac100ddb70b4</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I&amp;#39;m unclear exactly what it is you *are* looking for.&amp;nbsp; For instance are you looking for instances of &amp;quot; ideal &amp;quot; (i.e. with whitespace / non-word characters before and after, what we might call a &amp;quot;whole word&amp;quot; search elsewhere)?&amp;nbsp; Or is it something else?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find exact text and not contains</title><link>https://community.appian.com/thread/109808?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 13:09:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f20c8986-02d4-4087-a124-0744a03bdfb6</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Maybe it&amp;#39;s too simplistic but aren&amp;#39;t you looking for &amp;quot; ideal &amp;quot; rather than &amp;quot;ideal&amp;quot;? That is, the spaces either side of a word matter?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>