The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to extract word in between specific words

RamyaGunasekaran
Météore

Example I have,

 

\\abcd123\aa\bb\cc\zip\folder1

\\abcd321\dd\zip\foldername1\gg

\\abdc213\aa\bb\cc\dd\zip\folder3\ee\ff

 

I want folder names as output like

folder1

foldername1

folder3

 

Help on this!!

10 RÉPONSES 10
Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @RamyaGunasekaran ,

 

I guess your folders doesn't always contain the word "folder" ?

RamyaGunasekaran
Météore

No it can be different name but following by zip folder

Jean-Balteryx
16 - Nebula
16 - Nebula

There is always "zip" before ?

atcodedog05
22 - Nova
22 - Nova

Hi @RamyaGunasekaran 

 

You can use regex like below. Filename after zip\

 

zip\\(\w+)\\?

 

 

Workflow:

atcodedog05_0-1626957127718.png

 

Hope this helps : )

 

Jean-Balteryx
16 - Nebula
16 - Nebula

@RamyaGunasekaran here is a workflow with a regex extracting the folder name !

Jean-Balteryx
16 - Nebula
16 - Nebula

@atcodedog05 got it before me !

RamyaGunasekaran
Météore

Above solution is working fine. But I got another case like below. Not only following by zip folder also by Bias folder

 

\\abcd123\aa\bb\cc\zip\folder1

\\abcd321\dd\zip\foldername1\gg

\\abdc213\aa\bb\cc\dd\Bias\folder3\ee\ff

\\abcd321\dd\Bias\folderNam6\hh

 

Expected Output:

folder1

foldername1

folder3

folderNam6

 

Help on this..

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @RamyaGunasekaran 

 

You can use regex like below.

 

 

(:?zip|Bias)\\(\w+)\\?

 

 

Workflow:

atcodedog05_0-1627301876794.png

Hope this helps : )

RamyaGunasekaran
Météore

In case if I have space in folder name, am not getting the complete name  of the folder like below

 

\\abcd123\aa\bb\cc\zip\folder1 subname\folder2

\\abcd321\dd\zip\foldername1_tt\gg

 

Expected Output:

folder1 subname

foldername1_tt

 

The ouput which am getting is

folder1

foldername1_tt

Étiquettes
Auteurs des meilleures solutions