Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

What will be the RegEx expression formula for dynamically renaming columns ?

ak515155
6 - Meteoroid

 

Hello ,

 

The column pattern is 

 

"Please select your level of awareness in the technology. [SQL]"

 

I want to rename the column into only 'SQL' . Appreciate if anyone has a potential solution.

 

Thanks and Regards,

Abhishek

5 REPLIES 5
Qiu
20 - Arcturus
20 - Arcturus

@ak515155 

I suppose you want the string between [].

Capture3.PNG

shreyanshrathod
11 - Bolide

Hi @ak515155 ,

 

Check if this works for you. I hope I have understood your problem statement correctly. If not, requesting you to share a sample workflow explaining the same.

 

In my attached solution, I am assuming there will always be a set of '[]' in which resides your desired column name.

Let me know if the solution helps.

 

Cheers,

Shreyansh Rathod

messi007
15 - Aurora
15 - Aurora

@ak515155,

 

The formula below will do the job for you as well:

 

messi007_0-1617258727837.png

 

Attached the workflow.

Hope this helps!

Regards

ak515155
6 - Meteoroid

Thank you @Qiu  !! This worked smoothly as expected. thanks a lot once again

 

If you can just explain the logic once , would be really helpful as I have just learning RegEx .

Qiu
20 - Arcturus
20 - Arcturus

@ak515155 
Glad to help and thank you for the accept mark.

I use this site to form and test RegEx.

And you also find very detailed explanation on the right hand side.

https://regex101.com/

 

Regex.PNG

Labels