community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.9

The latest release includes several enhancements designed to improve your Community experience!

Learn More

Regex Help

Meteoroid

Hi

 

I'm trying to extract the second FY20 Q1 data from this directory string but can't work out how I pick up the second one and not the first one that says FY20 Q1 June. Could someone tell me the correct syntax please?

 

Thank you!

2019-06-20_21-43-25.png

Pulsar
Pulsar

Hi @nsarayar 

 

If you are only trying to keep the FY20 Q1 part, use this expression in a Formula tool:

REGEX_Replace([Field1], ".*?(FY20 Q1)\\.*", "$1")

 

If you want to get rid of that part and keep everything else, use this:

REGEX_Replace([Field1], "(.*)?(FY20 Q1)(.*)", "$1$3")

 

 

Hope this helps! 

Alteryx
Alteryx

Hi there

 

Have a look at this sample workflow.

Alteryx
Alteryx

Nice solution @BarnesK 

Labels