<?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: remove part of a string (contingent upon number of periods within that string)? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/remove-part-of-a-string-contingent-upon-number-of-periods-within/m-p/7575#M7569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming there are no periods after the semicolon, this script should work:&lt;/P&gt;&lt;P&gt;(&lt;SPAN style="color: #011993; font-family: Courier; font-size: 12px;"&gt;Change "Column" to the name of the column with strings&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;col &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #942193;"&gt;"Column"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;For Each Row&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; w &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Words&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; col&lt;STRONG&gt;[]&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;".;"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;If&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #032ce4;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; w &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;==&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; col&lt;STRONG&gt;[]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; w&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;"."&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; w&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;";"&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; w&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 05 Oct 2013 18:28:23 GMT</pubDate>
    <dc:creator>ms</dc:creator>
    <dc:date>2013-10-05T18:28:23Z</dc:date>
    <item>
      <title>remove part of a string (contingent upon number of periods within that string)?</title>
      <link>https://community.jmp.com/t5/Discussions/remove-part-of-a-string-contingent-upon-number-of-periods-within/m-p/7574#M7568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a column with strings of varying length.&amp;nbsp; All strings have 1 semicolon separating the first and last part of the string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some strings with no 'periods':&lt;/P&gt;&lt;P&gt;_______________;______&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some strings with 1 period&lt;/P&gt;&lt;P&gt;______.______;_______&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some strings with 2 periods&lt;/P&gt;&lt;P&gt;___._______._____;_________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a new column and populate it with the string of interest with the following conditions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;IF a string contains exactly 2 periods, I want to remove everything from the second period up to the semicolon&lt;UL&gt;&lt;LI&gt;example:&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;"before1st.after1st&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; color: #ff0000;"&gt;.after2nd&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;;afterSemiColon"&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;would return&amp;nbsp; "before1st.after1st;afterSemiColon"&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;ELSE, i just want to leave the string alone (no changes)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having trouble with this since the length of characters between each period can vary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;any help on the best way to &lt;/SPAN&gt;achieve&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt; this would be greatly appreciated!&amp;nbsp; thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Oct 2013 00:13:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/remove-part-of-a-string-contingent-upon-number-of-periods-within/m-p/7574#M7568</guid>
      <dc:creator>jmpbeginner</dc:creator>
      <dc:date>2013-10-05T00:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: remove part of a string (contingent upon number of periods within that string)?</title>
      <link>https://community.jmp.com/t5/Discussions/remove-part-of-a-string-contingent-upon-number-of-periods-within/m-p/7575#M7569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming there are no periods after the semicolon, this script should work:&lt;/P&gt;&lt;P&gt;(&lt;SPAN style="color: #011993; font-family: Courier; font-size: 12px;"&gt;Change "Column" to the name of the column with strings&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;col &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #942193;"&gt;"Column"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;For Each Row&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; w &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Words&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; col&lt;STRONG&gt;[]&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;".;"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;If&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #032ce4;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; w &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;==&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; col&lt;STRONG&gt;[]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; w&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;"."&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; w&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;";"&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; w&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Oct 2013 18:28:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/remove-part-of-a-string-contingent-upon-number-of-periods-within/m-p/7575#M7569</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2013-10-05T18:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: remove part of a string (contingent upon number of periods within that string)?</title>
      <link>https://community.jmp.com/t5/Discussions/remove-part-of-a-string-contingent-upon-number-of-periods-within/m-p/7576#M7570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you MS!&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;this works great.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;How would I modify this so that instead of editing the contents of "Column", it instead populates a new column with the new edited string?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 17:14:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/remove-part-of-a-string-contingent-upon-number-of-periods-within/m-p/7576#M7570</guid>
      <dc:creator>jmpbeginner</dc:creator>
      <dc:date>2013-10-07T17:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: remove part of a string (contingent upon number of periods within that string)?</title>
      <link>https://community.jmp.com/t5/Discussions/remove-part-of-a-string-contingent-upon-number-of-periods-within/m-p/7577#M7571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;col &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #942193;"&gt;"Column"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;new_col &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #942193;"&gt;"New Column"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; character &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;For Each Row&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; w &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Words&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; col&lt;STRONG&gt;[]&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;".;"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;If&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #032ce4;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; w &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;==&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; new_col&lt;STRONG&gt;[]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; w&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;"."&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; w&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;";"&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; w&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; new_col&lt;STRONG&gt;[]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; col&lt;STRONG&gt;[]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 17:43:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/remove-part-of-a-string-contingent-upon-number-of-periods-within/m-p/7577#M7571</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2013-10-07T17:43:29Z</dc:date>
    </item>
  </channel>
</rss>

