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.
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
binu_acs
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