<?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: Regex Issure with Decimals and Whole Numbers in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Regex-Issure-with-Decimals-and-Whole-Numbers/m-p/568238#M77901</link>
    <description>&lt;P&gt;If your source and destination are Numeric columns, then you can use a Boolean expression in a formula in the destination data column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(:Value - Round( :Value, 0 )) == 0&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Modulo( :Value, 1 ) == 0&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So your table looks like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="whole.PNG" style="width: 239px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47263i21A519FC7C459E9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="whole.PNG" alt="whole.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I used the Value Labels column property to display words instead of just 0 or 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2022 18:11:27 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2022-11-11T18:11:27Z</dc:date>
    <item>
      <title>Regex Issure with Decimals and Whole Numbers</title>
      <link>https://community.jmp.com/t5/Discussions/Regex-Issure-with-Decimals-and-Whole-Numbers/m-p/568189#M77898</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using JMP 16.2: I have a column with whole numbers and decimal numbers. I want to create a new column that flags the whole numbers (or the decimals).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column Name: Value&lt;/P&gt;&lt;P&gt;Column Inputs:&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;.5&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;3.768&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried several versions of the following Regex using a column formula:&lt;/P&gt;&lt;P&gt;Regex(Value,"\d+\,\d+", "Decimal")&lt;/P&gt;&lt;P&gt;Regex(Char(Value),"\d+\,\d+", "Decimal")&lt;/P&gt;&lt;P&gt;I have also tried parentheses and brackets throughout the second input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have noticed, if there is a column with ONLY decimals and not whole numbers, the regex works...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone have a useful trick to get this to work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:56:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regex-Issure-with-Decimals-and-Whole-Numbers/m-p/568189#M77898</guid>
      <dc:creator>Maerawlings</dc:creator>
      <dc:date>2023-06-10T23:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Issure with Decimals and Whole Numbers</title>
      <link>https://community.jmp.com/t5/Discussions/Regex-Issure-with-Decimals-and-Whole-Numbers/m-p/568202#M77899</link>
      <description>&lt;P&gt;Do you have a character column or some custom format? Which formats would you allow for decimals values? For example is ".1" valid decimal? And do you have to worry about something else besides those? You might be able to just use Contains(:Value, ".") and check if "." is found from the string&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;Good place to test (and learn) regex: &lt;A href="https://regex101.com/r/zBunSb/2" target="_blank"&gt;https://regex101.com/r/zBunSb/2&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 16:56:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regex-Issure-with-Decimals-and-Whole-Numbers/m-p/568202#M77899</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-11-11T16:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Issure with Decimals and Whole Numbers</title>
      <link>https://community.jmp.com/t5/Discussions/Regex-Issure-with-Decimals-and-Whole-Numbers/m-p/568221#M77900</link>
      <description>&lt;P&gt;Hello! The format for the NEW column is "Numeric" and the source column (Value) is also numeric. There are no characters in the source column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;".1" would not be valid, my mistake, they are marked as "0.1" for numbers &amp;lt;1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did try the contain and that is giving me a warning: Contains(:"Value"n,".")&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error: argument is wrong type&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(thanks for the regex site to test my ideas!)&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 17:55:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regex-Issure-with-Decimals-and-Whole-Numbers/m-p/568221#M77900</guid>
      <dc:creator>Maerawlings</dc:creator>
      <dc:date>2022-11-11T17:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Issure with Decimals and Whole Numbers</title>
      <link>https://community.jmp.com/t5/Discussions/Regex-Issure-with-Decimals-and-Whole-Numbers/m-p/568238#M77901</link>
      <description>&lt;P&gt;If your source and destination are Numeric columns, then you can use a Boolean expression in a formula in the destination data column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(:Value - Round( :Value, 0 )) == 0&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Modulo( :Value, 1 ) == 0&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So your table looks like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="whole.PNG" style="width: 239px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47263i21A519FC7C459E9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="whole.PNG" alt="whole.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I used the Value Labels column property to display words instead of just 0 or 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 18:11:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Regex-Issure-with-Decimals-and-Whole-Numbers/m-p/568238#M77901</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2022-11-11T18:11:27Z</dc:date>
    </item>
  </channel>
</rss>

