<?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>how to extract the id&amp;#39;s from the text</title><link>https://community.appian.com/discussions/f/general/40400/how-to-extract-the-id-s-from-the-text</link><description>hi team, 
 
 testing the emailid&amp;#39;s,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 2 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23 
 
 have to extract the id&amp;#39;s and after extracting need to format in below format, 
 
 12345-05, 
 123456-06</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: how to extract the id's from the text</title><link>https://community.appian.com/thread/154520?ContentTypeID=1</link><pubDate>Tue, 05 May 2026 10:03:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:867d12c4-094d-4ceb-8be4-42e88099a5fe</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;Check this :&lt;br /&gt;Also, you might have missed the last 12345-23 from the output. As per my understanding, it is a valid Id. &lt;br /&gt;Check if the Regex plugin is deployed in the environment to access regex functions.&lt;br /&gt;&lt;a href="/b/appmarket/posts/regular-expression-functions"&gt;Regular Expression Functions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!input: &amp;quot;testing the emailid&amp;#39;s,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 3 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23&amp;quot;,

  local!cleaned: regexreplaceall(&amp;quot;[^0-9\-]&amp;quot;, local!input, &amp;quot;&amp;quot;),

  local!ids: regexallmatches(&amp;quot;\d{5,7}-\d{2}&amp;quot;, local!cleaned),

  local!ids
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract the id's from the text</title><link>https://community.appian.com/thread/154519?ContentTypeID=1</link><pubDate>Tue, 05 May 2026 09:56:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:034a57d2-ffdf-4c39-a6ce-12db4dc6fbb8</guid><dc:creator>sureshs276515</dc:creator><description>&lt;p&gt;&lt;strong&gt;input:&lt;/strong&gt;&amp;nbsp;&lt;span&gt;testing the emailid&amp;#39;s,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 3 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;output&lt;/strong&gt;:1234567-45,1234567-92,1234567-23,1234567-22,1234567-92&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract the id's from the text</title><link>https://community.appian.com/thread/154518?ContentTypeID=1</link><pubDate>Tue, 05 May 2026 09:54:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:500d6b6f-f357-4dd8-ae78-6cc3f913819c</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;&lt;span&gt;Could you share your actual input and the expected output for the same input?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract the id's from the text</title><link>https://community.appian.com/thread/154517?ContentTypeID=1</link><pubDate>Tue, 05 May 2026 09:47:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:11cd80c2-b3b9-4222-822d-4fc5e8b2678f</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;Your text will be this after removing special characters and alphabets. &amp;quot;&lt;span&gt;&lt;span class="CollapsibleOutputNode---print_value"&gt;1234567-45 1234567-92 12 34 567- 2 2 1234567- 22 1234567-92 12345-23&amp;quot;&amp;nbsp;&lt;br /&gt;Still not sure on what basis 12345-05, 123456-06, 1234567-07 series will come along.&amp;nbsp;&lt;br /&gt;Give this code a try as a starter and then apply logic to get the desired series. The output format/logic is unclear to me, so I will leave it till this for you.&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!text: &amp;quot;testing the emailid&amp;#39;s,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 2 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23&amp;quot;,
  reject(
    fn!isnull,
    split(
      stripwith(
        local!text,
        &amp;quot;abcdefghijklmnopqrstuvwxyz!@#$%^&amp;amp;*();&amp;#39;,./&amp;lt;&amp;gt;?:&amp;quot;
      ),
      &amp;quot; &amp;quot;
    )
  )
)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract the id's from the text</title><link>https://community.appian.com/thread/154516?ContentTypeID=1</link><pubDate>Tue, 05 May 2026 09:34:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4789b373-20d7-4743-9d2d-ce419c6880c9</guid><dc:creator>sureshs276515</dc:creator><description>&lt;p&gt;hi &lt;a href="/members/harshas2775"&gt;Harsha Sharma&lt;/a&gt;&amp;nbsp;, In the email will get the input like &amp;quot;&lt;span&gt;testing the emailid&amp;#39;s,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 2 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23 &amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;need to extract the ID&amp;#39;s from text after extracting id&amp;#39;s then we have to truncate the spaces /alpha letters/special characters then need to format below .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;12345-05,&lt;/p&gt;
&lt;p&gt;123456-06&lt;/p&gt;
&lt;p&gt;1234567-07&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to extract the id's from the text</title><link>https://community.appian.com/thread/154515?ContentTypeID=1</link><pubDate>Tue, 05 May 2026 09:29:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:55e61391-5d30-4f4b-ae65-0d89fe1f5a22</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;Can you give better example of the email id and expected output. How &amp;quot;&lt;span&gt;1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 2 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23 &amp;quot; becomes the below , I cant make sense of it&lt;/span&gt;&lt;/p&gt;
[quote userid="332938" url="~/discussions/f/general/40400/how-to-extract-the-id-s-from-the-text"]&lt;p&gt;12345-05,&lt;/p&gt;
&lt;p&gt;123456-06&lt;/p&gt;
&lt;p&gt;1234567-07&lt;/p&gt;[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>