<?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: See if a string contain letters in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/See-if-a-string-contain-letters/m-p/2331525#M100501</link>
    <description>&lt;P&gt;Thank you very much for these detailed solutions, the explanation is very interesting and I have learned new things thanks to you! I'll make a note of this for another occasion&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; &lt;/P&gt;</description>
    <pubDate>Thu, 10 Nov 2022 13:32:02 GMT</pubDate>
    <dc:creator>stephbzr</dc:creator>
    <dc:date>2022-11-10T13:32:02Z</dc:date>
    <item>
      <title>See if a string contain letters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/See-if-a-string-contain-letters/m-p/2331522#M100498</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to replace with 0 if my data contains at least one letter. Here is an example and what I tried. But I don't have the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Z0LUlAAN.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154714i853EA9C5E26627BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Z0LUlAAN.png" alt="0695b00000Z0LUlAAN.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Z0LZMAA3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144889iEB78D1352F0AC886/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Z0LZMAA3.png" alt="0695b00000Z0LZMAA3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It doesn't matter which letter, my column should only contain numbers.&amp;nbsp;My column is of type string. The first condition works, but it is after the OR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:23:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/See-if-a-string-contain-letters/m-p/2331522#M100498</guid>
      <dc:creator>stephbzr</dc:creator>
      <dc:date>2024-11-15T22:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: See if a string contain letters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/See-if-a-string-contain-letters/m-p/2331523#M100499</link>
      <description>&lt;P&gt;Something like this will work.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;if&lt;/B&gt;(rep_numfac.trim().equals("") || rep_numfac.split("[a-zA-z]+").length&amp;gt;1){&lt;/P&gt;&lt;P&gt;	rep_numfac="0";&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all, you don't need the "replaceAll" to test the result of all spaces removed. You can use "trim" for this. The second part is a bit of a trick. Not all of Java's String methods for finding values use regex. "Contains" doesn't use a regex. It tries to find the exact String. The "split" method does use a regex though. This method splits the String when it matches the regex and creates an array. So, if the array size is greater than 1, you know it has non-numeric characters.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 18:39:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/See-if-a-string-contain-letters/m-p/2331523#M100499</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-08T18:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: See if a string contain letters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/See-if-a-string-contain-letters/m-p/2331524#M100500</link>
      <description>&lt;P&gt;Sorry, I was a bit of an idiot there. I omitted to think about multiple scenarios &lt;span class="lia-unicode-emoji" title=":grimacing_face:"&gt;😬&lt;/span&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A better way of doing this is to use this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;if&lt;/B&gt;(rep_numfac==null || rep_numfac.trim().equals("") || !rep_numfac.matches("[0-9]+")){&lt;/P&gt;&lt;P&gt;rep_numfac="0";&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially the above is saying, "If the rep_numfac is null OR rep_numfac is an empty String OR rep_numfac does NOT match just numbers".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep in mind, if you want to keep spaces or other symbols that are not numbers, you will need to modify the regex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 19:01:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/See-if-a-string-contain-letters/m-p/2331524#M100500</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-08T19:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: See if a string contain letters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/See-if-a-string-contain-letters/m-p/2331525#M100501</link>
      <description>&lt;P&gt;Thank you very much for these detailed solutions, the explanation is very interesting and I have learned new things thanks to you! I'll make a note of this for another occasion&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 13:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/See-if-a-string-contain-letters/m-p/2331525#M100501</guid>
      <dc:creator>stephbzr</dc:creator>
      <dc:date>2022-11-10T13:32:02Z</dc:date>
    </item>
  </channel>
</rss>

