<?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 extract part of char string in a column by using formula in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104802#M38826</link>
    <description>&lt;P&gt;I will assume that you know nothing about &lt;EM&gt;regular expressions&lt;/EM&gt;. The character function &lt;STRONG&gt;Regex&lt;/STRONG&gt;( "text", "regular expression", "result format" ) matches patterns defined by the regular&amp;nbsp;expression in the text and returns the result as defined by the format argument. You can refer to this topic in &lt;STRONG&gt;Help&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Books&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Scripting Guide&lt;/STRONG&gt; for more details. An alternative approach could be built around JMP &lt;EM&gt;patterns&lt;/EM&gt; and their related functions. The &lt;STRONG&gt;Scripting Guide&lt;/STRONG&gt; also covers that topic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How does the need for this adaptability arise? Does it depend in the data problem (i.e., a new problem and new data set) or does it have to handle more than one condition in the same result data column?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The regular&amp;nbsp;expression are generally quite specific, so the adaptation would require specifying all of the conditions to be found.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jan 2019 19:04:59 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2019-01-08T19:04:59Z</dc:date>
    <item>
      <title>How to extract part of char string in a column by using formula</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104776#M38818</link>
      <description>&lt;P&gt;For example, I have a char column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 1&lt;/P&gt;&lt;P&gt;Cordinate1:N23; Cordinate2:S45&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cordinate1:S78; Cordinate2:N85&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cordinate1:N67; Cordinate2:N90&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cordinate1:S33; Cordinate2:S74&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I am only interested in the infonation for Cordinate2 North, so I would like to create a new column by using some formula to extract the Cordinate2 N data. The results should look like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Column2&lt;/P&gt;&lt;P&gt;Cordinate1:N23; Cordinate2:S45&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Do not care&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cordinate1:S78; Cordinate2:N85&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N85&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cordinate1:N67; Cordinate2:N90&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N90&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cordinate1:S33; Cordinate2:S74&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Do not care&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 17:41:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104776#M38818</guid>
      <dc:creator>jasongao</dc:creator>
      <dc:date>2019-01-08T17:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract part of char string in a column by using formula</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104780#M38820</link>
      <description>&lt;P&gt;Use this expression in a column formula:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Regex( text, "Cordinate2:(N\d+)", "\1" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Jan 2019 17:51:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104780#M38820</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-01-08T17:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract part of char string in a column by using formula</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104781#M38821</link>
      <description>&lt;P&gt;Thanks Mark. Could you please explain the formula a little bit? so I can adapt it to my real data table. For example, sometimes I need use Cordinate1 North as serach pattern and exact Cordinate 2 info, like the results below. How can I adapt the formula? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Column2&lt;/P&gt;&lt;P&gt;Cordinate1:N23; Cordinate2:S45&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;S45&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cordinate1:S78; Cordinate2:N85&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Do not care&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cordinate1:N67; Cordinate2:N90&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;N90&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cordinate1:S33; Cordinate2:S74&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Do not care&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 18:13:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104781#M38821</guid>
      <dc:creator>jasongao</dc:creator>
      <dc:date>2019-01-08T18:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract part of char string in a column by using formula</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104802#M38826</link>
      <description>&lt;P&gt;I will assume that you know nothing about &lt;EM&gt;regular expressions&lt;/EM&gt;. The character function &lt;STRONG&gt;Regex&lt;/STRONG&gt;( "text", "regular expression", "result format" ) matches patterns defined by the regular&amp;nbsp;expression in the text and returns the result as defined by the format argument. You can refer to this topic in &lt;STRONG&gt;Help&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Books&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Scripting Guide&lt;/STRONG&gt; for more details. An alternative approach could be built around JMP &lt;EM&gt;patterns&lt;/EM&gt; and their related functions. The &lt;STRONG&gt;Scripting Guide&lt;/STRONG&gt; also covers that topic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How does the need for this adaptability arise? Does it depend in the data problem (i.e., a new problem and new data set) or does it have to handle more than one condition in the same result data column?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The regular&amp;nbsp;expression are generally quite specific, so the adaptation would require specifying all of the conditions to be found.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 19:04:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104802#M38826</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-01-08T19:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract part of char string in a column by using formula</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104813#M38828</link>
      <description>&lt;P&gt;Here's a column formula that will give you only North Coordinates.&amp;nbsp; It makes a few assumptions like they'll always be in this format.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;txt = Word( 2, Substitute( :Column 1, "Cordinate1", "", "Cordinate2", "" ), ":; " );
If( Left( txt, 1 ) == "N",
	txt,
	""
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Jan 2019 19:59:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/104813#M38828</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2019-01-08T19:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract part of char string in a column by using formula</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/105013#M38836</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 22:11:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-extract-part-of-char-string-in-a-column-by-using-formula/m-p/105013#M38836</guid>
      <dc:creator>jasongao</dc:creator>
      <dc:date>2019-01-08T22:11:51Z</dc:date>
    </item>
  </channel>
</rss>

