# How to extract only the numbers from a cell that has both text and numbers?

**URL:** <https://community.glideapps.com/t/how-to-extract-only-the-numbers-from-a-cell-that-has-both-text-and-numbers/65155>\
**Category:** Ask for Help\
**Created:** [August 18, 2023, 1:56pm UTC](https://community.glideapps.com/t/how-to-extract-only-the-numbers-from-a-cell-that-has-both-text-and-numbers/65155 "2023-08-18T13:56:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Higor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/higor/32/79708_2.png) [@Higor](https://community.glideapps.com/u/Higor)\
**Post date:** [August 18, 2023, 1:56pm UTC](https://community.glideapps.com/t/how-to-extract-only-the-numbers-from-a-cell-that-has-both-text-and-numbers/65155/1 "2023-08-18T13:56:17Z")

</div>

For example, imagine I have a cell that contains the following text:

Pasta $2.50, Hot Dog $5.00, Pizza $7.00…

I would like a cell that gives me the following result:

2.50, 5.00, 7.00…

That is, a cell that extracted all the letters automatically and left only the numbers, periods and commas. It is possible?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [August 18, 2023, 2:05pm UTC](https://community.glideapps.com/t/how-to-extract-only-the-numbers-from-a-cell-that-has-both-text-and-numbers/65155/2 "2023-08-18T14:05:47Z")

</div>

Try running it through a math column. I think that might strip out the text and keep it as a number.

---

<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:** [August 18, 2023, 2:15pm UTC](https://community.glideapps.com/t/how-to-extract-only-the-numbers-from-a-cell-that-has-both-text-and-numbers/65155/3 "2023-08-18T14:15:16Z")

</div>

Use the Replace All column with the following regular expression:

```auto
[A-Za-z\$]

```

and replace it with nothing.

 ![CleanShot 2023-08-18 at 22.15.47@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/3/b326945fdf6325590e9a792b85b540387a60b287.png)

PS. Jeff - taking the question literally (a joined list in a single column), the math column approach doesn’t work.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [August 18, 2023, 2:22pm UTC](https://community.glideapps.com/t/how-to-extract-only-the-numbers-from-a-cell-that-has-both-text-and-numbers/65155/4 "2023-08-18T14:22:20Z")

</div>

Good point. I was assuming one item per row.

---

<div class="post-metadata">

**Author:** ![Higor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/higor/32/79708_2.png) [@Higor](https://community.glideapps.com/u/Higor)\
**Post date:** [August 18, 2023, 2:24pm UTC](https://community.glideapps.com/t/how-to-extract-only-the-numbers-from-a-cell-that-has-both-text-and-numbers/65155/5 "2023-08-18T14:24:08Z")

</div>

It worked, thank you very much!

One more doubt…

It would be possible to do something similar to extract all other characters (such as commas and periods) so that only the numbers remain.

As in the case of the previous list:

Pasta $2.50, hot dog $5.00, pizza $7.00

I would like a cell with the following result:

250500700

That is, extract any other type of character or letter, leaving only a large number. It would be possible?

---

<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:** [August 18, 2023, 2:34pm UTC](https://community.glideapps.com/t/how-to-extract-only-the-numbers-from-a-cell-that-has-both-text-and-numbers/65155/6 "2023-08-18T14:34:02Z")

</div>

> [@Higor](#):
>
> That is, extract any other type of character or letter, leaving only a large number. It would be possible?

Yes, just modify the regular expression as follows:

```auto
[^\d]

```

 ![CleanShot 2023-08-18 at 22.33.34@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/d/ad1b9e67825944e4afe6a3705da6ae09880e47f9.png)

---

<div class="post-metadata">

**Author:** ![Higor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/higor/32/79708_2.png) [@Higor](https://community.glideapps.com/u/Higor)\
**Post date:** [August 18, 2023, 2:35pm UTC](https://community.glideapps.com/t/how-to-extract-only-the-numbers-from-a-cell-that-has-both-text-and-numbers/65155/7 "2023-08-18T14:35:15Z")

</div>

Perfect! Thank you one more time!
