Alteryx Designer Desktop Discussions

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

Extraction of String between two []

rebeccarlisle
6 - Meteoroid

Hi there

 

I am struggling to extract the string between the [] below and move it into a new column, dropping the rest of the string;

 

i.e. the field contains the following string: 'Germany[DE]' and I would only like to keep 'DE'. I have tried using REGEX Replace and the RegEx Tool but I have been unsuccessful.

 

Thanks for you help in advance.

2 REPLIES 2
jdunkerley79
ACE Emeritus
ACE Emeritus

Try the following a REGEX tool in parse mode with

\[(.*?)\]

The Square brackets must be escaped.

Thableaus
17 - Castor
17 - Castor

Hi @rebeccarlisle

 

Use the Parse Method and this RegEx

(.*)(?:\[)(.*)(?:\])

 

Cheers,

Labels