Free Trial

Alteryx Designer Desktop Discussions

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

Regex - Extracting text from a column with spaces, brackets and -

sriniprad08
11 - Bolide

Hi Team,

 

Hope you are well. I need help. I have column and i need to extract the text from the column.

 

Please find attached the input and output.

 

Thanks,

Sr

14 REPLIES 14
binuacs
21 - Polaris

@sriniprad08 

 

Trim(REGEX_Replace([Sit], '(.*)(\s)', "$2"))

 

binuacs_0-1642163292081.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @sriniprad08 

 

My take on this

 

Formula:

REGEX_Replace([Sit], "[^\s]+\s[^\s]+\s(.+)", "$1")

 

Workflow:

atcodedog05_0-1642163561946.png

 

Hope this helps : )

 

sriniprad08
11 - Bolide

Hi @binuacs ,

 

Thank you so much. I need help with the below please . Can you please let me know how to go about it?

 

Cheers,

Sr

sriniprad08
11 - Bolide

Hi @atcodedog05 ,

 

Thank you so much. 🙂 I need one more help I have attached the file. Can you please help me with that?

 

Cheers,

Sr

atcodedog05
22 - Nova
22 - Nova

Hi @sriniprad08 

 

Give this a try.

 

Hope this helps : )

binuacs
21 - Polaris
sriniprad08
11 - Bolide

Hi @atcodedog05 ,

 

Thank you for the help. Is it possible to remove the bracket from the below output after extracting it. Like below please only with KERATE and not bracket in a separate column with all other values.

 

 

Thanks

Sr

sriniprad08_0-1642172437966.png

 

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @sriniprad08 

 

Please find the updated workflow.

 

Formula:

REGEX_Replace([Sit], "[^\s]+\s[^\s]+\s\(?([^)]+)\)?", "$1")

 

Hope this helps : )

OllieClarke
15 - Aurora
15 - Aurora

Hi @sriniprad08 

 

Lots of solutions already, but here's how I would do this:

OllieClarke_0-1642172627253.png

Parsing 

.* (.+)

which will output everything after the final space into a new column

 

Hope that helps,

 

Ollie

 

Labels
Top Solution Authors