Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Extracting Partial FileName within []

zekharya
6 - Meteoroid

Hi all,

 

I would like to extract partial filenames within [] brackets.

Filename - "Real estates [Data centre] [SGD, RM].xlsx"

 

For example, I would like the output column to be "Data centre" or "SGD, RM" where required.

What will the RegEx expression be?

 

I was able to extract "Real estates" using (\<\w+\s+\w+\>).

Thank you in advance!

3 REPLIES 3
binuacs
21 - Polaris

@zekharya One way of doing this

REGEX_Replace([File NAme], '.*\[(.+)\].*', '$1')

 

binuacs_0-1667204983058.png

 

grazitti_sapna
17 - Castor

@zekharya Another way of doing it if you want both outputs in different columns.

 

grazitti_sapna_0-1667207745076.png

 

Sapna Gupta
zekharya
6 - Meteoroid

Thank you @binuacs and @grazitti_sapna!

Labels
Top Solution Authors