<?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: how to find and replace all instances of specified characters within a given column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252290#M49528</link>
    <description>&lt;P&gt;Thanks for that reply.&amp;nbsp; Maybe I am mistaken, but I thought Recode can be used to replace entire, known values with different values.&amp;nbsp; But in my case, to be more specific, the values of GROUP can be like "A05, or "B17, or anything of the form "***, where all I know is that the value starts with a " character and then the * characters are wildcards which could be anything.&amp;nbsp; Really all I want to do is just strip the " out of the values.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Mar 2020 20:25:04 GMT</pubDate>
    <dc:creator>fbm73</dc:creator>
    <dc:date>2020-03-13T20:25:04Z</dc:date>
    <item>
      <title>how to find and replace all instances of specified characters within a given column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252272#M49526</link>
      <description>&lt;P&gt;This is a very simple question.&amp;nbsp; I have a given column in a JMP table, and I want a JMP scripting command that will find and replace all instances of specified characters within that column.&amp;nbsp; For example, I have a column called GROUP, and certain rows in GROUP contain values like "A05 or "B17 and I would like to replace all " characters in GROUP so that the entries become A05 and B17 instead of "A05 and "B17.&amp;nbsp; This can easily be done manually by going to Table - Search - Find and then doing a find and replace, but is there a simple way to script this?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 18:10:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252272#M49526</guid>
      <dc:creator>fbm73</dc:creator>
      <dc:date>2020-03-13T18:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to find and replace all instances of specified characters within a given column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252281#M49527</link>
      <description>&lt;P&gt;You can use Recode to do replace in your jmp table. Before you submit it you can then grab the script to use in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alecpena_0-1584123674981.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22323iF4064BD7B843DB37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alecpena_0-1584123674981.png" alt="alecpena_0-1584123674981.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dt &amp;lt;&amp;lt; Begin Data Update;
dt &amp;lt;&amp;lt; Recode Column(
	dt:GROUP,
	{Map Value( _rcOrig, {"\!"A05", "A05", "\!"B17", "B17"}, Unmatched( _rcNow ) )},
	Target Column( :GROUP )
);
dt &amp;lt;&amp;lt; End Data Update;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 18:22:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252281#M49527</guid>
      <dc:creator>alecpena</dc:creator>
      <dc:date>2020-03-13T18:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to find and replace all instances of specified characters within a given column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252290#M49528</link>
      <description>&lt;P&gt;Thanks for that reply.&amp;nbsp; Maybe I am mistaken, but I thought Recode can be used to replace entire, known values with different values.&amp;nbsp; But in my case, to be more specific, the values of GROUP can be like "A05, or "B17, or anything of the form "***, where all I know is that the value starts with a " character and then the * characters are wildcards which could be anything.&amp;nbsp; Really all I want to do is just strip the " out of the values.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 20:25:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252290#M49528</guid>
      <dc:creator>fbm73</dc:creator>
      <dc:date>2020-03-13T20:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to find and replace all instances of specified characters within a given column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252315#M49530</link>
      <description>&lt;P&gt;Here is a simple piece of JSL that will handle your A05 issue&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Current Data Table();
foundRows = dt:yourColumn &amp;lt;&amp;lt; get rows where( Contains( :yourColumn, "A05" ) );
If( N Rows( foundRows ) &amp;gt; 0,
	:yourColumn[foundRows] = "A05"
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 14 Mar 2020 08:12:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252315#M49530</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-14T08:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to find and replace all instances of specified characters within a given column</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252387#M49542</link>
      <description>&lt;P&gt;To remove quotes loop over the rows and use the substitute function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "Test Quote Removal", Add Rows( 4 ),
	New Column( "Group", Character, "Nominal",
		Set Values( {"A05", "\!"A06", "\!"A07", "A08"} )
	)
);

for (i = 1, i &amp;lt;= nrows(dt), i++,
	dt:group[i] = substitute(dt:group[i], "\!"", "");
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 15 Mar 2020 12:37:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-find-and-replace-all-instances-of-specified-characters/m-p/252387#M49542</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2020-03-15T12:37:17Z</dc:date>
    </item>
  </channel>
</rss>

