# Parse Telephone numbers

**URL:** <https://forum.knime.com/t/parse-telephone-numbers/38901>\
**Category:** KNIME Analytics Platform\
**Created:** [January 19, 2022, 5:52pm UTC](https://forum.knime.com/t/parse-telephone-numbers/38901 "2022-01-19T17:52:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sw1336](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/ecb155/32.png) [@sw1336](https://forum.knime.com/u/sw1336)\
**Post date:** [January 19, 2022, 5:52pm UTC](https://forum.knime.com/t/parse-telephone-numbers/38901/1 "2022-01-19T17:52:21Z")

</div>

Hello,

If I have a US telephone number string as follows, how can I parse it in such a way where I can get the individual numbers?

Original String: 312 853-0408-0409, 4560-4563, 4567-4569

Output should be:  
312-853-0408  
312-853-0409  
312-853-4560  
312-853-4561  
312-853-4562  
312-853-4563  
312-853-4567  
312-853-4568  
312-853-4569

There is no pattern to what they provide. What would be the best way to approach this type of string?

Thank you.  
Regards.

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [January 19, 2022, 6:13pm UTC](https://forum.knime.com/t/parse-telephone-numbers/38901/2 "2022-01-19T18:13:00Z")

</div>

@sw1336 this node should be able to split the string. Then transpose the result.

> **[Cell Splitter](https://hub.knime.com/knime/extensions/org.knime.features.base/latest/org.knime.base.node.preproc.cellsplit2.CellSplitter2NodeFactory)**
>
> This node uses a user-specified delimiter character to split the content of a selected column into parts. It appends either a fixed number of columns to the in…

---

<div class="post-metadata">

**Author:** ![sw1336](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/ecb155/32.png) [@sw1336](https://forum.knime.com/u/sw1336)\
**Post date:** [January 19, 2022, 6:29pm UTC](https://forum.knime.com/t/parse-telephone-numbers/38901/3 "2022-01-19T18:29:51Z")

</div>

Thanks @mlauber71. How should I handle the range?

From 4560-4563 to 4561, 4562 and 4563.

Thanks again.

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [January 19, 2022, 7:48pm UTC](https://forum.knime.com/t/parse-telephone-numbers/38901/4 "2022-01-19T19:48:20Z")

</div>

OK should have read more carfully. Operation a little bit more complicated. Will try to check it out.

---

<div class="post-metadata">

**Author:** ![elsamuel](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/b4bc9f/32.png) [@elsamuel](https://forum.knime.com/u/elsamuel)\
**Post date:** [January 19, 2022, 8:31pm UTC](https://forum.knime.com/t/parse-telephone-numbers/38901/5 "2022-01-19T20:31:08Z")

</div>

[Here’s](https://hub.knime.com/elsamuel/spaces/Public/latest/Parse%20Telephone%20Number%20Ranges) a workflow that demonstrates one way to do this transformation.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/a/4/a472f1c96b9ed99c12d27498689d8f13cf4916ae.png)

It starts with this:  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/f/ff944655581dac86d10fde0e9adff56641ca94fb.png)

and ends with this:  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/e/8/e84aa025266542227132aca3f93fe549abf669a3.png)

If you have multiple ranges to parse, then you’d encapsulate this entire workflow in a Chunk or Window Loop to treat each row.

---

<div class="post-metadata">

**Author:** ![sw1336](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/ecb155/32.png) [@sw1336](https://forum.knime.com/u/sw1336)\
**Post date:** [January 19, 2022, 9:28pm UTC](https://forum.knime.com/t/parse-telephone-numbers/38901/6 "2022-01-19T21:28:34Z")

</div>

Many thanks, @elsamuel! This really helps…

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [January 26, 2022, 9:29pm UTC](https://forum.knime.com/t/parse-telephone-numbers/38901/7 "2022-01-26T21:29:06Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
