<?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: Extract Phone Numbers from description in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580182#M442783</link>
    <description>&lt;P&gt;I have 4 different phone operators that start with unique numbers.&lt;/P&gt;&lt;P&gt;Unitel Operator: Phone number starts with &lt;FONT color="#FF0000"&gt;80, 86, 88, 89.&amp;nbsp;&lt;FONT color="#000000"&gt;For example &lt;FONT color="#FF0000"&gt;80&lt;/FONT&gt;807863, &lt;FONT color="#FF0000"&gt;86&lt;/FONT&gt;784531&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Skytel Operator: Phone number starts with &lt;FONT color="#FF0000"&gt;90, 91, 96.&amp;nbsp;&lt;FONT color="#000000"&gt;For example &lt;FONT color="#FF0000"&gt;90&lt;/FONT&gt;958745, &lt;FONT color="#FF0000"&gt;91&lt;/FONT&gt;547843&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Mobicom Operator: Phone number starts with &lt;FONT color="#FF0000"&gt;85, 94, 95, 99.&amp;nbsp;&lt;FONT color="#000000"&gt;For example &lt;FONT color="#FF0000"&gt;85&lt;/FONT&gt;783145, &lt;FONT color="#FF0000"&gt;95&lt;/FONT&gt;784121&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Gmobile Operator: Phone number starts with&amp;nbsp;&lt;FONT color="#FF0000"&gt;53, 83, 93, 97, 98.&amp;nbsp;&lt;FONT color="#000000"&gt;For example &lt;FONT color="#FF0000"&gt;98&lt;/FONT&gt;457412, &lt;FONT color="#FF0000"&gt;97&lt;/FONT&gt;453256&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 May 2019 01:47:53 GMT</pubDate>
    <dc:creator>Dulguun1998</dc:creator>
    <dc:date>2019-05-15T01:47:53Z</dc:date>
    <item>
      <title>Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1579851#M442761</link>
      <description>&lt;P&gt;I need to extract phone numbers from the transaction description.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My description&amp;nbsp; includes:&amp;nbsp;&lt;/P&gt;&lt;P&gt;TRF=001646195032-**********XX8741-&lt;FONT color="#FF0000"&gt;99072741&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;TRF=001646187958-**********XX2062-ATM1098&amp;gt;UB &lt;FONT color="#FF0000"&gt;99995075&lt;/FONT&gt;À&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;99296772&lt;/FONT&gt; ÕÀÀÍÀÀÑ: 020000 ÌßÃÌÀÐÑ¯ÐÝÍ ÑÀÍËÈÍ&lt;/P&gt;&lt;P&gt;My goal is to extract 8 digits phone numbers () from this description without the other unnecessary numbers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried&amp;nbsp;keepchar(DESCRIPTION,'0123456789') this method but my phone numbers keep mixing up with other numbers.&lt;/P&gt;&lt;P&gt;How can i extract only phone numbers&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me with this? I really appreciate it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1579851#M442761</guid>
      <dc:creator>Dulguun1998</dc:creator>
      <dc:date>2024-11-16T03:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1579857#M442762</link>
      <description>&lt;P&gt;In this scenario, we must check what qualifies as a phone number, like does it occur at the start or end or does it have any preceding or succeeding unique symbols if not all the numbers that appear in description will be returned&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 10:12:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1579857#M442762</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2019-05-14T10:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580182#M442783</link>
      <description>&lt;P&gt;I have 4 different phone operators that start with unique numbers.&lt;/P&gt;&lt;P&gt;Unitel Operator: Phone number starts with &lt;FONT color="#FF0000"&gt;80, 86, 88, 89.&amp;nbsp;&lt;FONT color="#000000"&gt;For example &lt;FONT color="#FF0000"&gt;80&lt;/FONT&gt;807863, &lt;FONT color="#FF0000"&gt;86&lt;/FONT&gt;784531&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Skytel Operator: Phone number starts with &lt;FONT color="#FF0000"&gt;90, 91, 96.&amp;nbsp;&lt;FONT color="#000000"&gt;For example &lt;FONT color="#FF0000"&gt;90&lt;/FONT&gt;958745, &lt;FONT color="#FF0000"&gt;91&lt;/FONT&gt;547843&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Mobicom Operator: Phone number starts with &lt;FONT color="#FF0000"&gt;85, 94, 95, 99.&amp;nbsp;&lt;FONT color="#000000"&gt;For example &lt;FONT color="#FF0000"&gt;85&lt;/FONT&gt;783145, &lt;FONT color="#FF0000"&gt;95&lt;/FONT&gt;784121&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Gmobile Operator: Phone number starts with&amp;nbsp;&lt;FONT color="#FF0000"&gt;53, 83, 93, 97, 98.&amp;nbsp;&lt;FONT color="#000000"&gt;For example &lt;FONT color="#FF0000"&gt;98&lt;/FONT&gt;457412, &lt;FONT color="#FF0000"&gt;97&lt;/FONT&gt;453256&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 01:47:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580182#M442783</guid>
      <dc:creator>Dulguun1998</dc:creator>
      <dc:date>2019-05-15T01:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580185#M442784</link>
      <description>&lt;P&gt;Can you please post reality rows along with output needed from description field?&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 02:46:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580185#M442784</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-05-15T02:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580187#M442785</link>
      <description>&lt;P&gt;For example :&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the Description:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;89061500&lt;/FONT&gt; ÕÀÀÍÀÀÑ: 320000 ÑÈÏÈÌÅÄÈÀ ÕÕÊ&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;94050119&lt;/FONT&gt; ÕÀÀÍÀÀÑ: 340000 ÒÓÍÃÀËÀÃ ÖÝÍÃÝËÌÀÀ&lt;/P&gt;&lt;P&gt;EB-16:45:44 (95920909) - tulbur &lt;FONT color="#FF0000"&gt;95920909&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;TRF=001619257110-**********XX6378-&lt;FONT color="#FF0000"&gt;99841895&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;My output:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;89061500&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;94050119&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;95920909&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;99841895&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 02:56:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580187#M442785</guid>
      <dc:creator>Dulguun1998</dc:creator>
      <dc:date>2019-05-15T02:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580207#M442787</link>
      <description>&lt;P&gt;This script fins the phone numbers:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Input:
LOAD RecNo() as ID,
	Descrip	
Inline
[
	Descrip
	89061500 ÕÀÀÍÀÀÑ: 320000 ÑÈÏÈÌÅÄÈÀ ÕÕÊ
	94050119 ÕÀÀÍÀÀÑ: 340000 ÒÓÍÃÀËÀÃ ÖÝÍÃÝËÌÀÀ	
	EB-16:45:44 (95920909) - tulbur 95920909
	TRF=001619257110-**********XX6378-99841895
	TRF=001646195032-**********XX8741-99072741
	TRF=001646187958-**********XX2062-ATM1098&amp;gt;UB 99995075À
	99296772 ÕÀÀÍÀÀÑ: 020000 ÌßÃÌÀÐÑ¯ÐÝÍ ÑÀÍËÈÍ
];

//List of valid phone prefixes
Set vMatch = 80,86,88,89,90,91,96,85,94,95,99,53,83,93,97,98;

Output:
//Filter for telephone numbers
LOAD ID,
	Descrip,
	AllNumbers as Phone
Where Match(Num(Left(AllNumbers, 2)), $(vMatch))
;
//Split out the tokens
LOAD ID,
	Descrip,
	SubField(CleanNumbers, ' ') as AllNumbers
;
//Replace all delimiters with spaces and discard other non-numerics
LOAD ID,
	Descrip,
	KeepChar(Replace(
		Replace(
			Replace(Descrip, '=', ' '), '-', ' '), '&amp;gt;', ' '),
		'0123456789 '
	) as CleanNumbers
Resident Input;

//Clean up
DROP Table Input;&lt;/LI-CODE&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 450px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/12055iF5C8A3770B26741A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 06:10:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580207#M442787</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-05-15T06:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580213#M442788</link>
      <description>&lt;P&gt;Another way could be using a loop through the string like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;//List of valid phone prefixes
Set vMatch = 80,86,88,89,90,91,96,85,94,95,99,53,83,93,97,98;

Load
	*
Where Not IsNull(PhNum)	;
Load
	ID,
	Description,
	Mid(Description, IterNo(),8),
	IterNo(),
	If(IsNum(Replace(Mid(Description, IterNo(),8),' ','*')) and Match(Mid(Description, IterNo(),2), $(vMatch)), Mid(Description, IterNo(),8)) as PhNum

While IterNo()&amp;lt;=Len(Description)-7;
	
Input:
LOAD RecNo() as ID,
	Description	
Inline
[
	Description
	89061500 ÕÀÀÍÀÀÑ: 320000 ÑÈÏÈÌÅÄÈÀ ÕÕÊ
	94050119 ÕÀÀÍÀÀÑ: 340000 ÒÓÍÃÀËÀÃ ÖÝÍÃÝËÌÀÀ	
	EB-16:45:44 (95920909) - tulbur 95920909
	TRF=001619257110-**********XX6378-99841895
	TRF=001646195032-**********XX8741-99072741
	TRF=001646187958-**********XX2062-ATM1098&amp;gt;UB 99995075À
	99296772 ÕÀÀÍÀÀÑ: 020000 ÌßÃÌÀÐÑ¯ÐÝÍ ÑÀÍËÈÍ
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using Jonathan's script above upto some extend.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 396px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/12057i84E524EE26890C8D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 06:43:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580213#M442788</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-05-15T06:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580217#M442789</link>
      <description>&lt;P&gt;Hi Jonty,&lt;/P&gt;&lt;P&gt;I was checking another thread which seems to a question on generating missing values.&lt;/P&gt;&lt;P&gt;I have always done generating values from top to bottom but not able to find the logic to do it from bottom to top could you please have a look at&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-Scripting/Qlik-Sense-fill-cells-from-the-bottom-to-the-top/m-p/1579781#M95229" target="_blank"&gt;https://community.qlik.com/t5/QlikView-Scripting/Qlik-Sense-fill-cells-from-the-bottom-to-the-top/m-p/1579781#M95229&lt;/A&gt;&amp;nbsp;and provide some solution there .&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have tagged you as well on that post&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 06:42:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580217#M442789</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2019-05-15T06:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580224#M442791</link>
      <description>&lt;P&gt;Is there any situation will come row as below?&lt;/P&gt;&lt;P&gt;TRF=001619257110-**********XX6378-&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;99841895&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;99841895&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 06:56:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580224#M442791</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-05-15T06:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580233#M442792</link>
      <description>&lt;P&gt;The output should be the last one&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;99841895&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 07:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580233#M442792</guid>
      <dc:creator>Dulguun1998</dc:creator>
      <dc:date>2019-05-15T07:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580264#M442796</link>
      <description>&lt;P&gt;I really appreciate your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I load my Descriptions from the QVD file instead of loading from Inline?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 08:30:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1580264#M442796</guid>
      <dc:creator>Dulguun1998</dc:creator>
      <dc:date>2019-05-15T08:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Phone Numbers from description</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1581337#M442914</link>
      <description>&lt;P&gt;Thank you for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your script works perfectly except this Description ( EB-14:19:01 (89789086) - {mb:ps}&lt;FONT color="#FF0000"&gt;88483240&lt;/FONT&gt; ).&lt;/P&gt;&lt;P&gt;My output should be this number &lt;FONT color="#FF0000"&gt;88483240&lt;/FONT&gt; but instead, my output showing me this 9789086).&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I fix this&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 02:12:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-Phone-Numbers-from-description/m-p/1581337#M442914</guid>
      <dc:creator>Dulguun1998</dc:creator>
      <dc:date>2019-05-17T02:12:11Z</dc:date>
    </item>
  </channel>
</rss>

