# Clean up an input field for commas, dots, etc

**URL:** <https://forum.bubble.io/t/clean-up-an-input-field-for-commas-dots-etc/133825>\
**Category:** Plugins\
**Created:** [February 1, 2021, 12:04pm UTC](https://forum.bubble.io/t/clean-up-an-input-field-for-commas-dots-etc/133825 "2021-02-01T12:04:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanck](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@ryanck](https://forum.bubble.io/u/ryanck)\
**Post date:** [February 1, 2021, 12:04pm UTC](https://forum.bubble.io/t/clean-up-an-input-field-for-commas-dots-etc/133825/1 "2021-02-01T12:04:22Z")

</div>

Hello,

¿Does anyone know how to clean up an input field so when it´s submitted to the database, there is no spaces, dots, commas, etc.?

We´ve an input where we ask for a VAT ID and we need it without any character in the middle or at the end.

For example: some users insert the VAT ID like “BE.857.98-67” but I need just the “BE8579867”.

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![ryanck](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@ryanck](https://forum.bubble.io/u/ryanck)\
**Post date:** [February 1, 2021, 12:11pm UTC](https://forum.bubble.io/t/clean-up-an-input-field-for-commas-dots-etc/133825/2 "2021-02-01T12:11:09Z")

</div>

I´m responding to myself. But maybe with this?

> [@What is the regex pattern to remove all characters except numbers and letters?](http://forum.bubble.io/t/what-is-the-regex-pattern-to-remove-all-characters-except-numbers-and-letters/77055/2):
>
> This should work: [^a-zA-Z0-9]. Replace that with nothing. — Kevin AirDev We’re looking for Bubble developers to join our team: [https://jobs.airdev.co/](https://jobs.airdev.co/home)

---

<div class="post-metadata">

**Author:** ![cmarchan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cmarchan/32/253062_2.png) [@cmarchan](https://forum.bubble.io/u/cmarchan)\
**Post date:** [February 1, 2021, 12:22pm UTC](https://forum.bubble.io/t/clean-up-an-input-field-for-commas-dots-etc/133825/3 "2021-02-01T12:22:38Z")

</div>

Explore how the :find/replace text operator works

---

<div class="post-metadata">

**Author:** ![ryanck](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@ryanck](https://forum.bubble.io/u/ryanck)\
**Post date:** [February 1, 2021, 1:43pm UTC](https://forum.bubble.io/t/clean-up-an-input-field-for-commas-dots-etc/133825/4 "2021-02-01T13:43:00Z")

</div>

How do you use in combination with :trimmed? First the find and replace and second the :trimmed?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![technoswift](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/technoswift/32/100188_2.png) [@technoswift](https://forum.bubble.io/u/technoswift)\
**Post date:** [June 21, 2021, 8:40pm UTC](https://forum.bubble.io/t/clean-up-an-input-field-for-commas-dots-etc/133825/5 "2021-06-21T20:40:39Z")

</div>

:trimmed only removes spaces at front and end of text,  
:find&replace removes spaces, comma, and other characters from the middle of the texts

hope this helps
