In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
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

extract portion of url using regex

Shaina1
8 - Asteroid

Hi, I have urls of the form X\Y\Z\A KPI 2021.xlsx|||B , Z\H\W\B Daily KPI 2022.xlsx|||E, D\F\C\E\G - Daily KPI 2021.xlsx|||G. I'm looking to extract A KPI, B Daily KPI, G - Daily KPI. In terms of consistency- these strings will always within the last \ and before d{4} i.e. the years expression 2021, 2022. Also-this expression would definitely contain the word KPI and sometimes also contain the word Daily, so something like (Daily|KPI) would be needed in the regex portion. Can anyone help with this ? Thanks

5 REPLIES 5
flying008
15 - Aurora

Hi, @Shaina1 

 

You want to like this ?

 

flying008_0-1666067360173.png

 

binu_acs
21 - Polaris

@Shaina1 One way of doing this

 

binuacs_0-1666076598964.png

 

bkurt
8 - Asteroid

bkurt_0-1666077189530.png

 

Shaina1
8 - Asteroid

Hi, thanks a lot for this ! Unfortunately, I'm still getting nulls only as my regex output. I did notice the additional dots in the expression that you have displayed. I don't need the A.KPI or B.Daily.KPI- Just need A KPI or B Daily KPI out. For now-I'm getting nulls only.

Shaina1
8 - Asteroid

Thank you everyone ! I saw these messages later. Please discard my above message. The regex is working for me now :)

Labels
Top Solution Authors