<?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: select text between delimiters in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/select-text-between-delimiters/m-p/5020#M5019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Starts with() returns 0 or 1.&amp;nbsp; If that is part of a formula that require character argument, that could explain the error message. However, Starts with() alone would not give that error if :Term is a character column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case,&amp;nbsp; the Word() function should work.&lt;/P&gt;&lt;P&gt;Paste this into a column formula&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2600eb;"&gt;Word&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009694;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #150097;"&gt;:&lt;/SPAN&gt;Term&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #a70096;"&gt;"[]"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you want to replace the values in the :Term column, try running this script (assumes there is always some text before "[")&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2600eb;"&gt;For Each Row&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #150097;"&gt;:&lt;/SPAN&gt;Term &lt;SPAN style="color: #150097;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2600eb;"&gt;Word&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009694;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #150097;"&gt;:&lt;/SPAN&gt;Term&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #a70096;"&gt;"[]"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #150097;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regex() can also be used and allows a more fool-proof search. However, here it requires some extra effort since \[ and \] have special but different meaning in jsl and grep.&lt;/P&gt;&lt;P&gt;But this should work:&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #801392;"&gt;&lt;SPAN style="color: #2800e1;"&gt;regex&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(:Term&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;"\[\[(.+?)\]\]"&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;"\1"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Marcus Sundbom&#xD;&lt;BR /&gt;Added Regex()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Jun 2012 20:33:06 GMT</pubDate>
    <dc:creator>ms</dc:creator>
    <dc:date>2012-06-10T20:33:06Z</dc:date>
    <item>
      <title>select text between delimiters</title>
      <link>https://community.jmp.com/t5/Discussions/select-text-between-delimiters/m-p/5019#M5018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp; I'm trying to write a formula to select text that lies between the delimiters [ ].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All text in my column appears as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RinseAid[Apex.Rinse]*(Temp-130)&lt;/P&gt;&lt;P&gt;RinseAid[AutoDri]*(Temp-130)&lt;/P&gt;&lt;P&gt;RinseAid[Bright&amp;amp;Dry]*(Temp-130)&lt;/P&gt;&lt;P&gt;RinseAid[Clarity]*(Temp-130)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to keep only the text between the [ ] symbols:&lt;/P&gt;&lt;P&gt;Apex.Rinse&lt;/P&gt;&lt;P&gt;AutoDri&lt;/P&gt;&lt;P&gt;Bright&amp;amp;Dry&lt;/P&gt;&lt;P&gt;Clarity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But using a formula such as below, Iget a mesage that the formula requires a character&lt;/P&gt;&lt;P&gt; Starts With( :Term, "[" ),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&amp;nbsp; thanks, Paul&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2012 00:32:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-text-between-delimiters/m-p/5019#M5018</guid>
      <dc:creator>paulp</dc:creator>
      <dc:date>2012-06-09T00:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: select text between delimiters</title>
      <link>https://community.jmp.com/t5/Discussions/select-text-between-delimiters/m-p/5020#M5019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Starts with() returns 0 or 1.&amp;nbsp; If that is part of a formula that require character argument, that could explain the error message. However, Starts with() alone would not give that error if :Term is a character column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case,&amp;nbsp; the Word() function should work.&lt;/P&gt;&lt;P&gt;Paste this into a column formula&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2600eb;"&gt;Word&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009694;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #150097;"&gt;:&lt;/SPAN&gt;Term&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #a70096;"&gt;"[]"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you want to replace the values in the :Term column, try running this script (assumes there is always some text before "[")&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2600eb;"&gt;For Each Row&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #150097;"&gt;:&lt;/SPAN&gt;Term &lt;SPAN style="color: #150097;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2600eb;"&gt;Word&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #009694;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #150097;"&gt;:&lt;/SPAN&gt;Term&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #a70096;"&gt;"[]"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #150097;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regex() can also be used and allows a more fool-proof search. However, here it requires some extra effort since \[ and \] have special but different meaning in jsl and grep.&lt;/P&gt;&lt;P&gt;But this should work:&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #801392;"&gt;&lt;SPAN style="color: #2800e1;"&gt;regex&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(:Term&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;"\[\[(.+?)\]\]"&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;"\1"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Marcus Sundbom&#xD;&lt;BR /&gt;Added Regex()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Jun 2012 20:33:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/select-text-between-delimiters/m-p/5020#M5019</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2012-06-10T20:33:06Z</dc:date>
    </item>
  </channel>
</rss>

