Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Extracting file name from customized path

User12
7 - Meteor

Hello everyone!

 

I have a list of paths that lead to exact sheet, but I need only File name.

I suppose it should be a solution via RegEx ( I don't know how to use this tool properly)

Formula tool is not working well in my example (Filegetfilename).

 

Could you, please, provide me with the suitable expression? 

 

Workflow with the data attached below.

 

Thanks in advance!

13 REPLIES 13
binuacs
20 - Arcturus

@User12 Attaching the workflow

 

REGEX_Replace([Path], '.*\\(.*)\.xlsx.*', '$1')

 

binuacs_0-1670944977600.png

 

ShankerV
17 - Castor

Hi @User12 

 

Regex toll has 4 different output methods. You can use which suits your need, I have used Parse as I need to extract the output to a new column.

 

ShankerV_0-1670945192511.png

 

1. Parse helps to create a new column for the output.

Each () will create a new output.

 

.*\\(.*)(.\l{4})\|\|\|.*

 

ShankerV_1-1670945400082.png

 

Below cheat sheet will help you, 

 

ShankerV_2-1670945730455.png

 

Let me know if you have more questions.

 

Many thanks

Shanker V

 

 

PhilipL
Alteryx Alumni (Retired)

@User12  If you don't want to use RegEx, here's a solution that takes a different path. :)

PhilipL_0-1670947924582.png

 

 

 

User12
7 - Meteor

Thank you so much! It's really helpful :)

Labels