<?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 do we add a whitespace within the string in one of lists of which specific character length bigger than standard form? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-we-add-a-whitespace-within-the-string-in-one-of-lists-of/m-p/433947#M68376</link>
    <description>&lt;P&gt;Here is one way of doing what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

For Each Row(
	holdString = "";
	wordNum = 1;
	While( Word( wordNum, :column 1, " " ) != "",
		theWord = Word( wordNum, :column 1, " " );
		If( Length( theWord ) &amp;gt; 5,
			theWord = Substr( theWord, 1, 3 ) || " " || Substr( theWord, 4 )
		);
		holdString = holdString || " " || theWord;
		wordNum++;
	);
	:Column 1 = Trim( holdString );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 08 Nov 2021 09:12:26 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-11-08T09:12:26Z</dc:date>
    <item>
      <title>How do we add a whitespace within the string in one of lists of which specific character length bigger than standard form?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-we-add-a-whitespace-within-the-string-in-one-of-lists-of/m-p/433919#M68372</link>
      <description>&lt;P&gt;For an example;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Character Column#1 at row#1: asd 123 deg &lt;U&gt;&lt;STRONG&gt;jkldjsakldjlk&lt;/STRONG&gt;&lt;/U&gt; 1124&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if length of any of word within the cell value is bigger than "5", I want a whitespace on the third character.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideal form is as below&lt;/P&gt;&lt;P&gt;Character Column#1 at row#1: asd 123 deg &lt;U&gt;&lt;STRONG&gt;jkl djsakldjlk&lt;/STRONG&gt;&lt;/U&gt; 1124&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:40:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-we-add-a-whitespace-within-the-string-in-one-of-lists-of/m-p/433919#M68372</guid>
      <dc:creator>joelahn</dc:creator>
      <dc:date>2023-06-10T23:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do we add a whitespace within the string in one of lists of which specific character length bigger than standard form?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-we-add-a-whitespace-within-the-string-in-one-of-lists-of/m-p/433946#M68375</link>
      <description>&lt;P&gt;One way would be to use Regex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This might work:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Names Default To Here(1);

line = "asd 123 deg jkldjsakldjlk 1124";
span_line = Regex(line, "([a-zA-Z0-9]{3})([a-zA-Z0-9]{3,})", "\1 \2", GLOBALREPLACE);
show(span_line == "asd 123 deg jkl djsakldjlk 1124");

line = "1 22 333 4444 55555 666666 7777777 88888888 999999999 0000000000";
span_line = Regex(line, "([a-zA-Z0-9]{3})([a-zA-Z0-9]{3,})", "\1 \2", GLOBALREPLACE);
show(span_line);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/CuxFKx/1" target="_blank" rel="noopener"&gt;https://regex101.com/r/CuxFKx/1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 09:07:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-we-add-a-whitespace-within-the-string-in-one-of-lists-of/m-p/433946#M68375</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-11-08T09:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do we add a whitespace within the string in one of lists of which specific character length bigger than standard form?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-we-add-a-whitespace-within-the-string-in-one-of-lists-of/m-p/433947#M68376</link>
      <description>&lt;P&gt;Here is one way of doing what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

For Each Row(
	holdString = "";
	wordNum = 1;
	While( Word( wordNum, :column 1, " " ) != "",
		theWord = Word( wordNum, :column 1, " " );
		If( Length( theWord ) &amp;gt; 5,
			theWord = Substr( theWord, 1, 3 ) || " " || Substr( theWord, 4 )
		);
		holdString = holdString || " " || theWord;
		wordNum++;
	);
	:Column 1 = Trim( holdString );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Nov 2021 09:12:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-we-add-a-whitespace-within-the-string-in-one-of-lists-of/m-p/433947#M68376</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-11-08T09:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do we add a whitespace within the string in one of lists of which specific character length bigger than standard form?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-we-add-a-whitespace-within-the-string-in-one-of-lists-of/m-p/434237#M68401</link>
      <description>&lt;P&gt;I am not sure if you an interactive, a formula, or a scripted solution. The Cols &amp;gt; Recode command provides a rich tool for changing values in a column. See examples and instructions for Recode &lt;A href="https://www.jmp.com/support/help/en/16.1/#page/jmp/recode-data-in-a-column.shtml" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 19:20:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-we-add-a-whitespace-within-the-string-in-one-of-lists-of/m-p/434237#M68401</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-11-08T19:20:48Z</dc:date>
    </item>
  </channel>
</rss>

