<?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: mathematical.NUM clarification in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/mathematical-NUM-clarification/m-p/2377653#M139464</link>
    <description>&lt;P&gt;Hi maybe you can use something like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; ((your_String) != null &amp;amp;&amp;amp; (your String).length()&amp;gt;0 &amp;amp;&amp;amp; !(your String).replaceAll("(^-?\\d+$)|(^-?\\d+\\.\\d*$)","").isEmpty())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;return true if your string is not null and not empty and the value of the string is&lt;/P&gt;&lt;P&gt; -(optionnal) + some digits(one ore more) &lt;/P&gt;&lt;P&gt; or &lt;/P&gt;&lt;P&gt; -(optionnal) + some digits(one or more) followed by a dot followed by some digits (one or more)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it will match : &lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt; -10 &lt;/P&gt;&lt;P&gt;10.34 &lt;/P&gt;&lt;P&gt;-10.34 &lt;/P&gt;&lt;P&gt;for exemple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can also write a routine method like this one if you want to use Double for eg:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public static boolean &lt;B&gt;isNumeric&lt;/B&gt;(String strNum) {&lt;/P&gt;&lt;P&gt; if (strNum == null) {&lt;/P&gt;&lt;P&gt; return false;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; try {&lt;/P&gt;&lt;P&gt; double d = Double.parseDouble(strNum);&lt;/P&gt;&lt;P&gt; } catch (NumberFormatException nfe) {&lt;/P&gt;&lt;P&gt; return false;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; return true;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Send me love and kudos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 09:18:26 GMT</pubDate>
    <dc:creator>gjeremy1617088143</dc:creator>
    <dc:date>2022-01-21T09:18:26Z</dc:date>
    <item>
      <title>mathematical.NUM clarification</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mathematical-NUM-clarification/m-p/2377650#M139461</link>
      <description>&lt;P&gt;the documentation for mathematical.NUM says it checks if the string in numeric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So - if it is Integer (i.e. only 0-9 digits)?&lt;/P&gt;&lt;P&gt;How about with a decimal point?  Ex 4.9809 ?&lt;/P&gt;&lt;P&gt;How about scientific notation 2.3E-9 ?&lt;/P&gt;&lt;P&gt;How about with comma:  5,230 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It isn't clear what 'numeric' is.  My main concern is with decimal point in v 7.3.  The other questions are just for completeness.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 18:11:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mathematical-NUM-clarification/m-p/2377650#M139461</guid>
      <dc:creator>bglaplante</dc:creator>
      <dc:date>2022-01-18T18:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: mathematical.NUM clarification</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mathematical-NUM-clarification/m-p/2377651#M139462</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Look into the source code of this function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;public static int NUM(String e) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (e.matches("\\d+")) { //$NON-NLS-1$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the function check the string if it only contains 0-9 digits. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 06:25:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mathematical-NUM-clarification/m-p/2377651#M139462</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-19T06:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: mathematical.NUM clarification</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mathematical-NUM-clarification/m-p/2377652#M139463</link>
      <description>&lt;P&gt;Well, that's a pity it doesn't see 99.95 as a number.  Or -9 as a number either!  Definite documentation update needed.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 21:20:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mathematical-NUM-clarification/m-p/2377652#M139463</guid>
      <dc:creator>bglaplante</dc:creator>
      <dc:date>2022-01-20T21:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: mathematical.NUM clarification</title>
      <link>https://community.qlik.com/t5/Talend-Studio/mathematical-NUM-clarification/m-p/2377653#M139464</link>
      <description>&lt;P&gt;Hi maybe you can use something like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; ((your_String) != null &amp;amp;&amp;amp; (your String).length()&amp;gt;0 &amp;amp;&amp;amp; !(your String).replaceAll("(^-?\\d+$)|(^-?\\d+\\.\\d*$)","").isEmpty())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;return true if your string is not null and not empty and the value of the string is&lt;/P&gt;&lt;P&gt; -(optionnal) + some digits(one ore more) &lt;/P&gt;&lt;P&gt; or &lt;/P&gt;&lt;P&gt; -(optionnal) + some digits(one or more) followed by a dot followed by some digits (one or more)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it will match : &lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt; -10 &lt;/P&gt;&lt;P&gt;10.34 &lt;/P&gt;&lt;P&gt;-10.34 &lt;/P&gt;&lt;P&gt;for exemple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can also write a routine method like this one if you want to use Double for eg:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public static boolean &lt;B&gt;isNumeric&lt;/B&gt;(String strNum) {&lt;/P&gt;&lt;P&gt; if (strNum == null) {&lt;/P&gt;&lt;P&gt; return false;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; try {&lt;/P&gt;&lt;P&gt; double d = Double.parseDouble(strNum);&lt;/P&gt;&lt;P&gt; } catch (NumberFormatException nfe) {&lt;/P&gt;&lt;P&gt; return false;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; return true;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Send me love and kudos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 09:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/mathematical-NUM-clarification/m-p/2377653#M139464</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2022-01-21T09:18:26Z</dc:date>
    </item>
  </channel>
</rss>

