<?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: Find and Replace all instances of a specific character with another character but leave the rest untouched in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/529235#M75271</link>
    <description>&lt;P&gt;Hey!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a bunch for your answer! After modifying the code a bit I got it to work for me!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I'd only need to set the Column Format to "Engineering". Do you know how I could add that to my script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 06:05:52 GMT</pubDate>
    <dc:creator>Lien</dc:creator>
    <dc:date>2022-08-02T06:05:52Z</dc:date>
    <item>
      <title>Find and Replace all instances of a specific character with another character but leave the rest untouched</title>
      <link>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/528877#M75240</link>
      <description>&lt;P&gt;Heyho!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am currently trying to replace all instances of "." with "," in a script, since I am in the EU and that is our decimal. Have seen some solutions to about the same problem that I have but they do not seem to work or I am just too stupid to use them for my case.&lt;/P&gt;
&lt;P&gt;Any help is appreciated!&lt;/P&gt;
&lt;P&gt;I will attach a picture of my data.&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="data.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44519i24B33663177A5826/image-size/large?v=v2&amp;amp;px=999" role="button" title="data.png" alt="data.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Lien :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:52:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/528877#M75240</guid>
      <dc:creator>Lien</dc:creator>
      <dc:date>2023-06-10T23:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace all instances of a specific character with another character but leave the rest untouched</title>
      <link>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/528905#M75242</link>
      <description>&lt;P&gt;Even though I'm from EU I always use "." as my decimal separator, so my example will be using "," as "wrong" decimal. Starting table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1659368979989.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44439iB56DEDD667FCF19A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1659368979989.png" alt="jthi_0-1659368979989.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Recode Column 1 to capture the script&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1659368993796.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44440i00D520E0C6FE5BB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1659368993796.png" alt="jthi_1-1659368993796.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1659369003220.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44441i47547F5102B5BA25/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1659369003220.png" alt="jthi_2-1659369003220.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_3-1659369009393.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44442iFE15D0BB0FD7BDB7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_3-1659369009393.png" alt="jthi_3-1659369009393.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_4-1659369019962.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44443i78A4D28F30A88915/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_4-1659369019962.png" alt="jthi_4-1659369019962.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;From Enhanced Log&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_5-1659369041392.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44444iC66C0337B14D404C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_5-1659369041392.png" alt="jthi_5-1659369041392.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And finally script it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled 3",
	Add Rows(2),
	New Column("Column 1", Character, "Nominal", Set Values({"1.1", "1.2", "1.2E-3"})),
	New Column("Column 2", Character, "Nominal", Set Values({"2,1", "2,3", "1.2E3"}))
);
dt &amp;lt;&amp;lt; Begin Data Update;

For Each({col_name}, dt &amp;lt;&amp;lt; Get Column Names("String"),
	dt &amp;lt;&amp;lt; Recode Column(
		AsColumn(col_name),
		{Substitute(_rcNow, ",", ".")},
		Update Properties(1),
		Target Column(As Column(col_name))
	);
	Column(dt, col_name) &amp;lt;&amp;lt; Set Data Type("Numeric");
	Column(dt, col_name) &amp;lt;&amp;lt; Set Modeling Type("Continuous");
);

dt &amp;lt;&amp;lt; End Data Update;	
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Aug 2022 15:56:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/528905#M75242</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-08-01T15:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace all instances of a specific character with another character but leave the rest untouched</title>
      <link>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/528952#M75246</link>
      <description>&lt;P&gt;My suggestion is to use the Find/Replace dialog.&amp;nbsp; It allows you to search the entire data table and replace the "," with the "." in one click.&lt;/P&gt;
&lt;P&gt;Give the following data table&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1659373331491.png" style="width: 554px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44446iA166A9B9A534FA6D/image-dimensions/554x360?v=v2" width="554" height="360" role="button" title="txnelson_0-1659373331491.png" alt="txnelson_0-1659373331491.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;there are several values that contain commas.&lt;/P&gt;
&lt;P&gt;Either type&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;CNTL/F&lt;/P&gt;
&lt;P&gt;or go to&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Edit=&amp;gt;Search=&amp;gt;Find&lt;/P&gt;
&lt;P&gt;the following window will open&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1659373585995.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44447iCB4753DBAC2F26EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1659373585995.png" alt="txnelson_1-1659373585995.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Simply fill in the string to find and the string to replace it with&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_2-1659373659921.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44448iDFE473F243D16443/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_2-1659373659921.png" alt="txnelson_2-1659373659921.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and then click on Replace All, and the data table will be searched and all commas will be replaced with periods&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_3-1659373770071.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44449i11BD31049E12AF47/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_3-1659373770071.png" alt="txnelson_3-1659373770071.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And the data table will be changed&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_4-1659373808253.png" style="width: 628px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44450i4EC7C812219E9BF5/image-dimensions/628x436?v=v2" width="628" height="436" role="button" title="txnelson_4-1659373808253.png" alt="txnelson_4-1659373808253.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 17:10:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/528952#M75246</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-08-01T17:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace all instances of a specific character with another character but leave the rest untouched</title>
      <link>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/529235#M75271</link>
      <description>&lt;P&gt;Hey!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a bunch for your answer! After modifying the code a bit I got it to work for me!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I'd only need to set the Column Format to "Engineering". Do you know how I could add that to my script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 06:05:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/529235#M75271</guid>
      <dc:creator>Lien</dc:creator>
      <dc:date>2022-08-02T06:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace all instances of a specific character with another character but leave the rest untouched</title>
      <link>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/529236#M75272</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your answer! Unfortunately I'd need it in a script.I already knew of the search and replace function of JMP but I needed it automated.&lt;/P&gt;&lt;P&gt;The other answer from jthi already helped me out here but thanks anyways!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Lien&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 06:08:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/529236#M75272</guid>
      <dc:creator>Lien</dc:creator>
      <dc:date>2022-08-02T06:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace all instances of a specific character with another character but leave the rest untouched</title>
      <link>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/529250#M75274</link>
      <description>&lt;P&gt;Easiest way is to let JMP script it for you and then use that script yourself.&lt;/P&gt;
&lt;P&gt;1. Change column Format to Engineering on some column and press apply&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1659425382607.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44476iF2027A3E454C817E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1659425382607.png" alt="jthi_0-1659425382607.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. If you have JMP16 and enhanced log enabled you will see the script needed there (just fix references)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1659425418625.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44477i28775BF018598968/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1659425418625.png" alt="jthi_1-1659425418625.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. If not, there are still few ways to get the script:&lt;/P&gt;
&lt;P&gt;4. Use data tables red triangle option and use Copy Table Script (No Data)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1659425480897.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44478iF00274DBE7B8D99C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1659425480897.png" alt="jthi_2-1659425480897.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;5. Find the column you changed to Engineering&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_3-1659425527983.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44479i7D23B5A9F2567B07/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_3-1659425527983.png" alt="jthi_3-1659425527983.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;6. Just try getting the Format part from the script and using in on different column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:height &amp;lt;&amp;lt; Format("Engineering", 6);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;7. If it works, great. If it doesn't it is time to open Scripting Index (it might be good idea to search for it in scripting index anyway).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;8. Search for Format and from the long list of different JMP Objects look for Data Table and Column Scripting. This will help you narrow down the options&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_4-1659425643416.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44480i9161A48048BAE546/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_4-1659425643416.png" alt="jthi_4-1659425643416.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 07:34:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Find-and-Replace-all-instances-of-a-specific-character-with/m-p/529250#M75274</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-08-02T07:34:48Z</dc:date>
    </item>
  </channel>
</rss>

