<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Modify (aka Mass Impact) Formulas and RegEx Examples in DemandTools</title>
    <link>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1267#M693</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://mycommunity.validity.com/t5/user/viewprofilepage/user-id/276"&gt;@michael-wtds&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Here's one we discussed yesterday.&amp;nbsp; It is a way to replace accented letters with their English letter equivalents:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE( ${Name},"ā","a"),"à","a"),"á","a"),"â","a"),"ã","a"),"ä","a"),"å","a"),"è","e"),"é","e"),"ê","e"),"ë","e"),"ç","c"),"ì","i"),"í","i"),"î","i"),"ï","i"),"ð","th"),"ñ","n"),"ò","o"),"ó","o"),"ô","o"),"õ","o"),"ö","o"),"ù","u"),"ú","u"),"û","u"),"ü","u"),"ý","y"),"ÿ","y"),"š","s"),"Ž","z")&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Thu, 31 Aug 2023 14:38:28 GMT</pubDate>
    <dc:creator>AnthonyValidity</dc:creator>
    <dc:date>2023-08-31T14:38:28Z</dc:date>
    <item>
      <title>Modify (aka Mass Impact) Formulas and RegEx Examples</title>
      <link>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1257#M687</link>
      <description>&lt;P&gt;&lt;a href="https://mycommunity.validity.com/t5/user/viewprofilepage/user-id/19"&gt;@AnthonyValidity&lt;/a&gt;&amp;nbsp;following yesterday call when regex formulas came up, I thought it would be useful to share a compilation of regex formulas for Modify and Matching mapping comparison&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Disclaimer&lt;/STRONG&gt;: Many of these formulas were sourced from online platforms like Validity, other Trailhead, Stack Exchange and other websites. While not all are my original work, they have been modified to suit my specific needs.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Update Account Territory by Billing State&lt;/STRONG&gt;&lt;BR /&gt;if_StringReturn( isNull({billingstate}), "Unassigned",&lt;BR /&gt;if_StringReturn( RegExReplace({billingstate},"IA|IL|IN|KS|MI|MN|MO|ND|NE|OH|OK|SD|TX|WI","1")="1","Central",&lt;BR /&gt;if_StringReturn( RegExReplace({billingstate},"AL|AR|CT|DC|DE|FL|GA|KY|LA|MA|MD|ME|MS|NC|NH|NJ|NY|PA|RI|SC|TN|VA|VT|WV","1")="1", "East",&lt;BR /&gt;if_StringReturn( RegExReplace({billingstate},"AK|HI|AZ|CA|CO|ID|NM|NV|OR|UT|WA|WY|MT","1")="1", "West",&lt;BR /&gt;"Unassigned"&lt;BR /&gt;))))&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. NA Phone Fix&lt;/STRONG&gt;&lt;BR /&gt;IF(OR( CountryMatchReturnLongName(${MailingCountry}, true) = "United States",&lt;BR /&gt;OR(LEFT(${Phone},1) = "1", LEFT(${Phone},2) = "+1"),&lt;BR /&gt;AND(LEN(${MailingCountry}) = 0, LEN(${MailingState}) = 0)),&lt;BR /&gt;NaPhoneFix(${Phone}),&lt;BR /&gt;${Phone})&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. Extract domain from website field:&lt;/STRONG&gt;&lt;BR /&gt;RegExReplace(${Website}, "^(?:https?:\/\/)?(?:www\.)?([^\/]+)(\/.*)?$", "$1")&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4. Extract domain from email:&lt;/STRONG&gt;&lt;BR /&gt;RegExReplace(${Email}, ".*@(.+)$", "$1")&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5. Matching: Last Name from a full name source field&lt;/STRONG&gt;&lt;BR /&gt;Regular Expression: (\b(\w+)\W*$)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6. Matching: Full name without any whitespace&lt;/STRONG&gt;&lt;BR /&gt;Regular Expression: (\s\w+)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;7. Remove any special character from a name field&lt;/STRONG&gt;&lt;BR /&gt;RegExReplace(${Name}, "[\!\@\#\$\%\^\&amp;amp;\*\(\)\_\-\+\=\.\;\:\?\&amp;lt;\,\&amp;gt;\{\}\[\]\`\~]", "")&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;8. Match the right 8 digits of account number&lt;BR /&gt;&lt;/STRONG&gt;- useful when file drops leading zeros for a text field that always has the leading zeros&lt;BR /&gt;&amp;lt;MatchField&amp;gt;salesconnect__customer_account_number__c&amp;lt;/MatchField&amp;gt;&lt;BR /&gt;&amp;lt;MappingType&amp;gt;Regular Expression: (\d{8}$)&amp;lt;/MappingType&amp;gt;&lt;/P&gt;&lt;P&gt;Feel free to add your own formulas or modifications to this list.&lt;/P&gt;&lt;P&gt;All the best!&lt;BR /&gt;Michael&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 12:47:29 GMT</pubDate>
      <guid>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1257#M687</guid>
      <dc:creator>michael-wtds</dc:creator>
      <dc:date>2023-08-31T12:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Modify (aka Mass Impact) Formulas and RegEx Examples</title>
      <link>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1263#M689</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://mycommunity.validity.com/t5/user/viewprofilepage/user-id/276"&gt;@michael-wtds&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;This is great stuff!&amp;nbsp; I really appreciate you posting this year for all to use.&amp;nbsp; I'm going to look them over and "borrow" some myself &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 12:55:47 GMT</pubDate>
      <guid>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1263#M689</guid>
      <dc:creator>AnthonyValidity</dc:creator>
      <dc:date>2023-08-31T12:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Modify (aka Mass Impact) Formulas and RegEx Examples</title>
      <link>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1265#M691</link>
      <description>&lt;P&gt;Wow, this is awesome&amp;nbsp;&lt;a href="https://mycommunity.validity.com/t5/user/viewprofilepage/user-id/276"&gt;@michael-wtds&lt;/a&gt;&amp;nbsp;Thanks for sharing!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 13:49:37 GMT</pubDate>
      <guid>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1265#M691</guid>
      <dc:creator>Ashley_Validity</dc:creator>
      <dc:date>2023-08-31T13:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Modify (aka Mass Impact) Formulas and RegEx Examples</title>
      <link>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1266#M692</link>
      <description>&lt;P&gt;I see&amp;nbsp;&lt;a href="https://mycommunity.validity.com/t5/user/viewprofilepage/user-id/45"&gt;@Ashley_Validity&lt;/a&gt;&amp;nbsp;has published some formulas in a prior post as well -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Training Recording &amp;amp; Formula Examples: Using Formulas for Advanced Data Standardization" href="https://mycommunity.validity.com/t5/demandtools/training-recording-amp-formula-examples-using-formulas-for/td-p/1066" target="_self"&gt;Training Recording &amp;amp; Formula Examples: Using Formulas for Advanced Data Standardization&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 14:16:11 GMT</pubDate>
      <guid>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1266#M692</guid>
      <dc:creator>michael-wtds</dc:creator>
      <dc:date>2023-08-31T14:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Modify (aka Mass Impact) Formulas and RegEx Examples</title>
      <link>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1267#M693</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://mycommunity.validity.com/t5/user/viewprofilepage/user-id/276"&gt;@michael-wtds&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Here's one we discussed yesterday.&amp;nbsp; It is a way to replace accented letters with their English letter equivalents:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE( ${Name},"ā","a"),"à","a"),"á","a"),"â","a"),"ã","a"),"ä","a"),"å","a"),"è","e"),"é","e"),"ê","e"),"ë","e"),"ç","c"),"ì","i"),"í","i"),"î","i"),"ï","i"),"ð","th"),"ñ","n"),"ò","o"),"ó","o"),"ô","o"),"õ","o"),"ö","o"),"ù","u"),"ú","u"),"û","u"),"ü","u"),"ý","y"),"ÿ","y"),"š","s"),"Ž","z")&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 14:38:28 GMT</pubDate>
      <guid>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1267#M693</guid>
      <dc:creator>AnthonyValidity</dc:creator>
      <dc:date>2023-08-31T14:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Modify (aka Mass Impact) Formulas and RegEx Examples</title>
      <link>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1590#M871</link>
      <description>&lt;P&gt;Here's an updated formula that works with DTV&amp;nbsp; -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;1. Update Account Territory by Billing State&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;LEN&lt;/SPAN&gt;&lt;SPAN&gt;(${BillingState}) &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt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N&gt;&lt;SPAN&gt;"1"&lt;/SPAN&gt;&lt;SPAN&gt;) = &lt;/SPAN&gt;&lt;SPAN&gt;"1"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"South"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 02:59:20 GMT</pubDate>
      <guid>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1590#M871</guid>
      <dc:creator>michael-wtds</dc:creator>
      <dc:date>2024-01-03T02:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Modify (aka Mass Impact) Formulas and RegEx Examples</title>
      <link>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1598#M878</link>
      <description>&lt;P&gt;This is great, thanks&amp;nbsp;&lt;a href="https://mycommunity.validity.com/t5/user/viewprofilepage/user-id/276"&gt;@michael-wtds&lt;/a&gt;!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 01:19:05 GMT</pubDate>
      <guid>https://mycommunity.validity.com/t5/demandtools/modify-aka-mass-impact-formulas-and-regex-examples/m-p/1598#M878</guid>
      <dc:creator>Ashley_Validity</dc:creator>
      <dc:date>2024-01-10T01:19:05Z</dc:date>
    </item>
  </channel>
</rss>

