CMS Development

SStrachan
Participant

RegEx remove Spaces

SOLVE

How can I remove the spaces from this string?

{% set broker = module.broker_one.properties.mobilephone|regex_replace("[^0-9]", " ") %}

The actual string is:

+33 6 16 39 19 59

It currently outputs 

33 6 16 39 19 59

I just need to remove the spaces.

0 Upvotes
1 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

RegEx remove Spaces

SOLVE

@SStrachan try removing the space between the " "

|regex_replace("[^0-9]", "")

View solution in original post

0 Upvotes
1 Reply 1
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

RegEx remove Spaces

SOLVE

@SStrachan try removing the space between the " "

|regex_replace("[^0-9]", "")
0 Upvotes