# Taking numbers out of a string

**URL:** <https://community.glideapps.com/t/taking-numbers-out-of-a-string/63373>\
**Category:** Ask for Help\
**Created:** [July 1, 2023, 1:13am UTC](https://community.glideapps.com/t/taking-numbers-out-of-a-string/63373 "2023-07-01T01:13:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rollo\_Wenlock](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rollo_wenlock/32/26956_2.png) [@Rollo\_Wenlock](https://community.glideapps.com/u/Rollo_Wenlock)\
**Post date:** [July 1, 2023, 1:13am UTC](https://community.glideapps.com/t/taking-numbers-out-of-a-string/63373/1 "2023-07-01T01:13:44Z")

</div>

I have a location area from an address, but it has the zip code baked in. I need to take the numbers out of the data. Example; ‘Christchurch 8023’ → make it ‘Christchurch’

![Screenshot 2023-07-01 at 1.13.12 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/6/e6f4f34189c86137110fd3135302b599354f4827.png)

---

<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:** [July 1, 2023, 2:21am UTC](https://community.glideapps.com/t/taking-numbers-out-of-a-string/63373/2 "2023-07-01T02:21:15Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/6/b64739dc403b77911ec59e0dfac252560e99d88c.png)

You can do something like this.

---

<div class="post-metadata">

**Author:** ![Rollo\_Wenlock](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rollo_wenlock/32/26956_2.png) [@Rollo\_Wenlock](https://community.glideapps.com/u/Rollo_Wenlock)\
**Post date:** [July 1, 2023, 2:43am UTC](https://community.glideapps.com/t/taking-numbers-out-of-a-string/63373/3 "2023-07-01T02:43:30Z")

</div>

That’s great thank you. It works really well except for entires with multiple words. Is there an update to the regular expression that will take care of this? cheers

 ![Screenshot 2023-07-01 at 2.42.04 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/7/d706c74de39531eb3ae53fe3c153f3864ff36c8f.png)

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [July 1, 2023, 2:50am UTC](https://community.glideapps.com/t/taking-numbers-out-of-a-string/63373/4 "2023-07-01T02:50:33Z")

</div>

Here’s an alternative way using a Math columns and Replace All column:

---

<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:** [July 1, 2023, 3:05am UTC](https://community.glideapps.com/t/taking-numbers-out-of-a-string/63373/5 "2023-07-01T03:05:41Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/b/8baf3c36fc5508d03cb7ee9527f7e25e116c9606.png)

Here you go.

---

<div class="post-metadata">

**Author:** ![Rollo\_Wenlock](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rollo_wenlock/32/26956_2.png) [@Rollo\_Wenlock](https://community.glideapps.com/u/Rollo_Wenlock)\
**Post date:** [July 1, 2023, 3:06am UTC](https://community.glideapps.com/t/taking-numbers-out-of-a-string/63373/6 "2023-07-01T03:06:02Z")

</div>

I added a space after A-Z like this and it worked out ([a-zA-Z]+)

---

<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:** [July 1, 2023, 3:07am UTC](https://community.glideapps.com/t/taking-numbers-out-of-a-string/63373/7 "2023-07-01T03:07:34Z")

</div>

Theoretically your solution will work with space characters, but if you have tabs or line breaks then I believe \s covers them.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [July 2, 2023, 3:08am UTC](https://community.glideapps.com/t/taking-numbers-out-of-a-string/63373/8 "2023-07-02T03:08:28Z")

</div>

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