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 after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start 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