Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Delete Spaces of

Inactive User
Not applicable

Hello guys, 
I have this problem, that I have a bad formatting headers with spaces and paragraphs. How can I delete this and connect it with "_" an underscore? I tried with REGEX_Replace([Value],' ', '_') but it does not work.... Can you help me? 

pietapa_1-1669126422633.png

 

7 REPLIES 7
Felipe_Ribeir0
16 - Nebula

Hi @Inactive User 

 

Could you share a print of how you are applying the formula? I tryed here and it seems to be doing what you want to do (replacing spaces by _, right?). You can use just replace([Value],' ', '_') instead btw.

 

Felipe_Ribeir0_2-1669127255640.png

 

 

Inactive User
Not applicable

Hi @Felipe_Ribeir0 

Hereis what it looks like ...

pietapa_0-1669127466217.png

 

Felipe_Ribeir0
16 - Nebula

Hi @Inactive User 

 

try this one. I think that what you have is not just spaces, but tabulations (\t):

Regex_Replace([Value], '\t', '_')

 

Felipe_Ribeir0_0-1669128340381.png

 

By default 1 tab is equal to 8 spaces, so if you want to keep the same number of spaces you could do:

Regex_Replace([Value], '\t', '________')

Inactive User
Not applicable

That does not work :( 
I think the problem is that I have line break... but I don't know

 

Felipe_Ribeir0
16 - Nebula

@Inactive User 

 

can you share a sample of your input file? Just with the first 10 rows or something like that.

Inactive User
Not applicable

@Felipe_Ribeir0 
I can not share any data. I created an example with my problem. 
The header is in the middle of the table and have the format like in the xlsx-data

OllieClarke
15 - Aurora
15 - Aurora

@Inactive User I think Regex_Replace([Value],'\s','_') is what you're after. It will replace any whitespace with an underscore

 

Hope that helps,

 

Ollie

Labels