Hello everyone,
I want to delete blank spaces within a string. For example, I want to take out blank spaces in the following string: "A & B" and get "A&B".
Can anyone help? Thank you so much!
Solved! Go to Solution.
Great answer. What if there was "10 A & B" and would like to see "10 A&B"?
REGEX_REPLACE([Text], '\s?(&)\s?', '$1')
This would work to remove spaces found before and/or after the marked group, which is only the "&" char, and replacing that found matches with the marked group, which is the $1 in the 3rd param. If it's required that a space be found before and after, remove the ?.
Jimmy
Teknion Data Solutions
Good afternoon!
I am trying to figure out the correct formula to remove the extra space in the full name. I have a screenshot of what the name looks like before, and the second screenshot is how I want my end result to look. Any advice is greatly appreciated!
Lorianne Spurr |
LorianneSpurr |
Thanks,
Erica
Hi @EricaNHenk
Not sure I fully understand your need. You mention that you want to remove extra space, which I would have interpreted as replacing 2 or more consecutive spaces with a single space, but the screenshots you shared suggest that you want to remove ALL spaces from the text string, in which case, the solution on this post should satisfy that need.
If it's not working, can you describe what you're seeing when the suggested expressions are attempted?
This does not work for me.