<?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 Regex within a column loop formula in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19634#M17895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying in vain to have theis column formula execute correctly&lt;/P&gt;&lt;P&gt;For( i = 0, i &amp;lt; 10, i++,&lt;/P&gt;&lt;P&gt;Regex( :Source, :Words to Remove&lt;I&gt;, "", global replace )&lt;/I&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;Ten words to remove from the source column and replaced with a null.&lt;/P&gt;&lt;P&gt;All help is appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jul 2016 19:39:19 GMT</pubDate>
    <dc:creator>vinkane</dc:creator>
    <dc:date>2016-07-22T19:39:19Z</dc:date>
    <item>
      <title>Regex within a column loop formula</title>
      <link>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19634#M17895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying in vain to have theis column formula execute correctly&lt;/P&gt;&lt;P&gt;For( i = 0, i &amp;lt; 10, i++,&lt;/P&gt;&lt;P&gt;Regex( :Source, :Words to Remove&lt;I&gt;, "", global replace )&lt;/I&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;Ten words to remove from the source column and replaced with a null.&lt;/P&gt;&lt;P&gt;All help is appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 19:39:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19634#M17895</guid>
      <dc:creator>vinkane</dc:creator>
      <dc:date>2016-07-22T19:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Regex within a column loop formula</title>
      <link>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19635#M17896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The for loop needs to start at 1.&amp;nbsp; the regex function needs to work with a JSL variable, it can't use the column.&amp;nbsp; You might want to use a table variable to hold the list of words to delete rather than keeping them in a column.&amp;nbsp; the JSL could be a lot simpler...see second example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;example 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;New Table( "Untitled 1",&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; Add Rows( 10 ),&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; New Column( "words to remove",&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; Character,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; "Nominal",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Values(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"aaa", "bbb", "ccc", "ddd", "eee", "fff", "ggg", "hhh", "iii", "jjj"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; New Column( "source",&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; Character,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; "Nominal",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Values(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"the aaa is bbb and bbb ccc", "a aaa b bbb c ccc ccc", "b bbb c ccc", "",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "", "", "", "", "", ""}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; New Column( "redacted",&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; Character,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; "Nominal",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Formula(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = :source;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For( i = 1, i &amp;lt;= 10, i++,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = Regex( x, :words to remove&lt;I&gt;, "", GLOBALREPLACE ),&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12038_pastedImage_58.png" style="width: 628px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/3407iBAC54781399EF690/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12038_pastedImage_58.png" alt="12038_pastedImage_58.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;example 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;New Table( "Untitled 2",&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; Add Rows( 10 ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; New Table Variable( "redactionlist", "aaa|bbb|ccc|ddd|eee|fff|ggg|hhh|iii|jjj" ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; New Column( "source",&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; Character,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; "Nominal",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Values(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"the aaa is bbb and bbb ccc", "a aaa b bbb c ccc ccc",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "fred iii ralph bbb bbb", "a aaa b bbb", "", "", "", "", "", ""}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; New Column( "redacted",&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; Character,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt; "Nominal",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Formula( Regex( :source, :redactionlist, "", GLOBALREPLACE ) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12037_pastedImage_31.png" style="width: 605px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/3408iDB4EEA8D5DD6E7B4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12037_pastedImage_31.png" alt="12037_pastedImage_31.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 03:25:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19635#M17896</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2016-10-19T03:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Regex within a column loop formula</title>
      <link>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19636#M17897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://kvoqx44227.lithium.com/people/VinKane" target="_blank"&gt;VinKane&lt;/A&gt;​ , a point of interest....s&lt;SPAN style="font-size: 13.3333px;"&gt;ince column formulas implicitly loop over all rows in a table, &lt;/SPAN&gt;I've often used a little trick when I want to script JSL in a column formula. So you in your case, the column formula would look something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12044_colfmlalooping.png" style="width: 965px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/3412i7F2F0A774138EE44/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12044_colfmlalooping.png" alt="12044_colfmlalooping.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 03:26:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19636#M17897</guid>
      <dc:creator>Phil_Brown</dc:creator>
      <dc:date>2016-10-19T03:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Regex within a column loop formula</title>
      <link>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19637#M17898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;!Thanks, works like a charm&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 13:35:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19637#M17898</guid>
      <dc:creator>vinkane</dc:creator>
      <dc:date>2016-07-25T13:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regex within a column loop formula</title>
      <link>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19638#M17899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great suggestion and hint. As a newbee I'm trying to absorb all of this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 13:36:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19638#M17899</guid>
      <dc:creator>vinkane</dc:creator>
      <dc:date>2016-07-25T13:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Regex within a column loop formula</title>
      <link>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19639#M17900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/people/VinKane"&gt;VinKane&lt;/A&gt;​, my pleasure. I should add that this method is useful for relatively simple scripts/formula. As requirements grow, you eventually are better off doing everything in pure JSL, as column formulas can get a bit tedious to edit/maintain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 18:08:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regex-within-a-column-loop-formula/m-p/19639#M17900</guid>
      <dc:creator>Phil_Brown</dc:creator>
      <dc:date>2016-07-25T18:08:08Z</dc:date>
    </item>
  </channel>
</rss>

