Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Regex Match for Year and Qtr (2022 Q3)

anayet1988
8 - Asteroid

When you have a field with years and qtrs i.e "2021 Q3" and want to only capture the Year and Qtr rows. The regex match used:

 

^\d{4}\sQ[1234]

1 REPLY 1
PhilipMannering
16 - Nebula
16 - Nebula

Or,

\d{4} Q[1-4]

the ^ is rendundant as you have to match the whole string. [1-4] does a range and saves you a character. and a ' ' instead of \s will match a space instead of any whitespace character (though it does have the disadvantage that it's harder to see sometimes).

 

Labels
Top Solution Authors