# Remove spaces or add spaces

**URL:** <https://community.hubspot.com/t/remove-spaces-or-add-spaces/44589>\
**Category:** Data Hub\
**Created:** [September 30, 2021, 12:05am UTC](https://community.hubspot.com/t/remove-spaces-or-add-spaces/44589 "2021-09-30T00:05:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wicara](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wicara/32/101660_2.png) [@wicara](https://community.hubspot.com/u/wicara)\
**Post date:** [September 30, 2021, 12:05am UTC](https://community.hubspot.com/t/remove-spaces-or-add-spaces/44589/1 "2021-09-30T00:05:52Z")

</div>

Hello,

I just created a re ops workflow to fix the phone number data. This helps to format all the data in a way in which the HubSpot call function can work. one thing I would like to fix is the spaces in phone numbers so I can get them consistent. eg +61X XXXX XXXX. Currently, there is no way to remove spaces in a string nor is there a way to add spaces in intervals.  
I imagine that this would be fairly common and a standard thing to use for phone numbers.

---

<div class="post-metadata">

**Author:** ![jbogaert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jbogaert/32/33027_2.png) [@jbogaert](https://community.hubspot.com/u/jbogaert)\
**Post date:** [September 30, 2021, 7:42am UTC](https://community.hubspot.com/t/remove-spaces-or-add-spaces/44589/2 "2021-09-30T07:42:30Z")

</div>

Hi @wicara !

If you have Operations Hub Pro, then you can create add a custom code action to your workflow. We are in the process of building a Programmable Automation Use Case Library ([link)](https://www.hubspot.com/programmable-automation-use-cases). It’s still in beta, but there are already around 12 certified use cases available, one of which can standardize U.S. phone numbers. [Here’s the link.](https://www.hubspot.com/programmable-automation-use-cases?offer=format-phone-numbers)

I can’t code very well myself, but I hope this code snipper might be a good basis for what you’re looking for. If you can code a little bit, you should be able to adjust the action to the outcome you require. Hope this helps!
