Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Extract text which starts from specific characters in string

RamyaGunasekaran
7 - Meteor

Hello All,

 

I have a filed value like

 

\\xx.com\Z00001\google

\\xx.com\Z00002\google

 

I want output as 

Z00001

Z00002

 

Help please!

4 REPLIES 4
DawnDuong
13 - Pulsar
13 - Pulsar

Hi @RamyaGunasekaran 

If the structure is always fixed, and you are less family with Regex, probably safer for you to use the standard Text to Column tool with \ as delimiter.

Dawn

 

RamyaGunasekaran
7 - Meteor

I want it in regex. Pls help on it @DawnDuong 

OllieClarke
16 - Nebula
16 - Nebula

Hey @RamyaGunasekaran 

 

If you want to get everything which starts with a Z and then is made of numbers then the following should get what you want:

(Z\d+)

With the RegEx tool in Parse mode

OllieClarke_0-1625139097235.png

If you also want to specify that they should fall between '\' then update the RegEx to

\\(Z\d+)\\

OllieClarke_1-1625139181899.png

Hope that helps,

 

Ollie

 

 

apathetichell
20 - Arcturus

REGEX_Replace([Field1],"\\\\.*\\(.*)\\\w+","$1")

 

This should look for the last entry which has a word and a preceding "\" it then should grab the data between that backslash and penultimate slash.

Labels
Top Solution Authors