# How do I remove dashes from phone numbers with Calc? [closed]

I have a long list of phone numbers and they currently have dashes and parentheses. I need for them to have no dashes, no spaces, and no parentheses!. Help!

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2016-03-04 16:12:12.246854

Sort by » oldest newest most voted

Editing:

Sorry for unnecessary complications: 'Search for' [(/\-\.)\\ ]* allone and 'Replace with' the empty string will also do.

(I thought I had tried that without success. trying again showed, there must have occurred a mistake.)

Obsolete: Other contributors of this forum may know better. (Tell me please!) I do not really understand - but experimenting a bit I found ...

Still valid: 'Find & Replace', 'Regular expressions' switched on,

Obsolete: ([^(/\-\.)\\ ]*)[(/\-\.)\\ ]* filled into 'Search for' and \$1 into 'replace with'

Still valid: ... and then 'Replace all' will do it. The needed iteration is performed automatically (and can be made undone in a single step). (I assumed you also want to abolish the slash, the backslash and the full stop.)

Please note: In Germany national phone numbers for international use are denoted as follows (by example): 0049(0)8911111111 (often ornamented using some dashs and spaces) where 0049 is the international prefix for Germany, 089 the national prefix for Munich, and 11111111 a phantasy number. If you simply abolish the parenthesis you will get 004908911111111 and this may not work. At least calling from a German net the 0 behind 49 will not be acceppted in this case. 00498911111111 would be correct!

Searching for $$0$$|[(/\-\.)\\ ]*, replacing with nothing and 'Replace all' will do as needed in this case.

In January 2013 I also designed formulae based on the standard functions of Calc for this (or similar) purpose by means of non-numeric iterations. I can provide an example document if you are interested.

more