<?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 the value of PM and CM from the given text.</title><link>https://community.appian.com/discussions/f/data/35192/extract-the-value-of-pm-and-cm-from-the-given-text</link><description>text - &amp;quot;CM: Nick Hunt ECE: Fred Wang General Contractor: Villamar PM: Rick Chan RF Designer: Eric Chan &amp;quot;, 
 output- 
 CM: Nick Hunt 
 PM: Rick Chan RF</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Extract the value of PM and CM from the given text.</title><link>https://community.appian.com/thread/136650?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2024 05:46:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9153d01d-92c2-487f-a336-d2437db76633</guid><dc:creator>Yogi Patel</dc:creator><description>&lt;p&gt;&lt;span&gt;Stefan already asked you to provide the required details (order, pattern, etc.) for an error-free solution. However, you can try the following code&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!text: &amp;quot;CM: Nick Hunt ECE: Fred Wang General Contractor: Villamar PM: Rick Chan RF Designer: Eric Chan &amp;quot;,
  local!dText: substitute(
    substitute(
      substitute(
        substitute(local!text, &amp;quot;ECE:&amp;quot;, &amp;quot;;ECE:&amp;quot;),
        &amp;quot;General Contractor:&amp;quot;,
        &amp;quot;;General Contractor:&amp;quot;
      ),
      &amp;quot;PM:&amp;quot;,
      &amp;quot;;PM:&amp;quot;
    ),
    &amp;quot;RF Designer:&amp;quot;,
    &amp;quot;;RF Designer:&amp;quot;
  ),
  local!data: split(local!dText, &amp;quot;;&amp;quot;),
  local!data
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Output:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_non_value"&gt;List of Text String - 5 items&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;CM: Nick Hunt &amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;ECE: Fred Wang &amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;General Contractor: Villamar &amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;PM: Rick Chan &amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;
&lt;ul class="SelectableTreeNode---componentConfigParam"&gt;&lt;/ul&gt;
&lt;ul class="SelectableTreeNode---nonComponentConfigParam"&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li class="SelectableTreeNode---selectableTreeNode SelectableTreeNode---leaf SelectableTreeNode---open SelectableTreeNode---allow_text_highlighting"&gt;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;&amp;quot;RF Designer: Eric Chan &amp;quot;&lt;/span&gt;&lt;span class="CollapsibleOutputNode---print_element_type"&gt;(Text)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract the value of PM and CM from the given text.</title><link>https://community.appian.com/thread/136627?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 12:50:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7c74d415-bd7d-42cd-9756-9301199bd9f5</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Can you share more details? Are these string always in the same order? Do names always have two parts? Are there any other abbreviations?&lt;/p&gt;
&lt;p&gt;It can be quite a challenge to create a robust algorithm that extracts specific parts from almost random text.&lt;/p&gt;
&lt;p&gt;And I need to ask again: Do you already have some code to share?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://appian.rocks/2023/12/20/episode-13-how-to-get-your-questions-answered/"&gt;appian.rocks/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract the value of PM and CM from the given text.</title><link>https://community.appian.com/thread/136625?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 12:46:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a8728500-7206-4148-9c11-4e42346e9ef0</guid><dc:creator>Rishu Kumar Gupta</dc:creator><description>&lt;p&gt;An expression rule return a value like&amp;nbsp; &amp;quot;&lt;span&gt;CM: Nick Hunt ECE: Fred Wang General Contractor: Villamar PM: Rick Chan RF Designer: Eric Chan &amp;quot;, and i want to extract the value PM &amp;amp; CM&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract the value of PM and CM from the given text.</title><link>https://community.appian.com/thread/136624?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 12:43:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e35202ab-13ec-4d10-ab69-3263cec20df2</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;OK. Do you have any specific questions or code you would want to share?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract the value of PM and CM from the given text.</title><link>https://community.appian.com/thread/136623?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 12:39:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:723110e7-b1c4-44fb-b0f5-e9b28060e35f</guid><dc:creator>Rishu Kumar Gupta</dc:creator><description>&lt;p&gt;no&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract the value of PM and CM from the given text.</title><link>https://community.appian.com/thread/136622?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 12:39:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6925f92c-ed8c-4088-8c44-c60fca680aca</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Is that a coding challenge?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>