How to replace two or more white spaces with a single white space?
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Silenciar
- Página de impresión sencilla
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Notificar al moderador
Here is the situation,
There are two white spaces before '-' in the first line where as there is only one white space in the second line. How do I get rid of two white spaces in the first line?
2018 Small North Chart - GRE
2018 Small South Chart - GRY
Thank You
¡Resuelto! Ir a solución.
- Etiquetas:
- Developer Tools
- Expression
- Help
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Notificar al moderador
Use this in a formula tool:
REGEX_Replace([Field], "\s+", " ")
The \s+ pattern matches one or more whitespace characters, which all get replaced by a single space.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Notificar al moderador
Ben
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Notificar al moderador
Under the covers, that is the formula being used.
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Notificar al moderador
Used a similar one.
Thank You
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Notificar al moderador
Thank You!
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Notificar al moderador
Great answer. What if there was "A&B 5 000,01" and would like to see "A&B 5000,01"? How would you do that?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Notificar al moderador
I like to start with the simplest regex solution possible, and adjust as I hit edge cases. For your situation, I would try looking for a number, followed by a space, followed by a number. Then replace it with the 2 numbers. The regex function which does that looks like this:
REGEX_Replace([Field], "(\d) (\d)", "$1$2")
You will have to check your data a bit to make sure no unwanted side-effects occur and that all of the changes you are expecting are made. If it accomplishes the goal, great! If not, we can tweak further.
