# Phone number too long, How to edit? (replace numbers with nothing)

**URL:** <https://community.glideapps.com/t/phone-number-too-long-how-to-edit-replace-numbers-with-nothing/71889>\
**Category:** Ask for Help\
**Created:** [March 21, 2024, 10:26am UTC](https://community.glideapps.com/t/phone-number-too-long-how-to-edit-replace-numbers-with-nothing/71889 "2024-03-21T10:26:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohad](https://avatars.discourse-cdn.com/v4/letter/o/f04885/32.png) [@ohad](https://community.glideapps.com/u/ohad)\
**Post date:** [March 21, 2024, 10:26am UTC](https://community.glideapps.com/t/phone-number-too-long-how-to-edit-replace-numbers-with-nothing/71889/1 "2024-03-21T10:26:33Z")

</div>

Hi,  
I have a list of phone numbers.  
Some are missing ZERO, so I fix it with template:  
X111111111  
And some has too many numbers:  
972111111111  
I would like to get rid of the 972 at the beginning.  
I tried do it with template but couldn’t figure out how,

What do you suggest?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 21, 2024, 10:34am UTC](https://community.glideapps.com/t/phone-number-too-long-how-to-edit-replace-numbers-with-nothing/71889/2 "2024-03-21T10:34:40Z")

</div>

> **[Extract Matching Text column | Glide](https://www.glideapps.com/plugins/regex)**
>
> Extract text matching a regular expression.

```auto
^972(\d+)

```

 ![CleanShot 2024-03-21 at 18.34.06@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/c/3c22102c840ba05829d350a7398febafb5bfc219.png)

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [March 27, 2024, 5:29pm UTC](https://community.glideapps.com/t/phone-number-too-long-how-to-edit-replace-numbers-with-nothing/71889/3 "2024-03-27T17:29:22Z")

</div>

Is there a pattern to the corrections you would like to make?

If so, you could for instance use the Slice Text column to remove + symbols in front of phone numbers. Or use the Remove All column to remove spaces or hyphens inside a phone number.

On the one hand I’m not crazy about regex because to me it’s a form of code, on the other I dislike reinventing the wheel. And phone number validation is no wheel. Phone number validation has been solve a billion times before, it bothers me to even have to think about it. So regular expression might come in handy.

Darren’s regex is making me dread the day I will need to start writing them. Past this short moment of dread, I wouldn’t be surprised if there are regex builders that allow us to build regular expressions without knowing regex syntax? Maybe Chad is good at regex ? (Chad is short for ChatGPT, that’s what I call him).

---

<div class="post-metadata">

**Author:** ![slscustom.ru](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/slscustom.ru/32/77336_2.png) [@slscustom.ru](https://community.glideapps.com/u/slscustom.ru)\
**Post date:** [March 27, 2024, 6:46pm UTC](https://community.glideapps.com/t/phone-number-too-long-how-to-edit-replace-numbers-with-nothing/71889/4 "2024-03-27T18:46:07Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/0/b0eec6b6022775da49e8f9af1defe30abd6cb544.png)  
Text Slice  
Start 3

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [March 28, 2024, 1:14am UTC](https://community.glideapps.com/t/phone-number-too-long-how-to-edit-replace-numbers-with-nothing/71889/5 "2024-03-28T01:14:11Z")

</div>

> [@nathanaelb](#):
>
> Darren’s regex is making me dread the day I will need to start writing them.

And that’s only a starter level regex. I really do hope you don’t need to dive into them.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 28, 2024, 4:59am UTC](https://community.glideapps.com/t/phone-number-too-long-how-to-edit-replace-numbers-with-nothing/71889/6 "2024-03-28T04:59:09Z")

</div>

Back in the day, I used to write quite a lot of regex. I was just having a fossick around in some of my old repos and found a few examples:

Extracts the model number, version and serial number from an SNMP Sysdesc string for an Orinoco Wifi device:

```auto
(/(AP-[0-9]+)\s*?(v[\w\.\(\)]+)\s+(SN-\w+)/)

```

The same, except for Lucent devices:

```auto
(/(WavePOINT\-\w+)\s+(V[\d\.]+)\s+(SN\-\w+)/)

```

Writing regex can fry your brain, but it can also be weirdly satisfying 🙂
