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.
解決済み

Filter string data for matching currencies

HomesickSurfer
クエーサー

All;

 

Is there a better way to filter probable scenarios having Canadian currency with CAD, CDN or C$ attached to or detached from the numeral, each with either a leading space or numeral, and; trailing space, numeral, period or comma?  This should capture all and omit possible false positives capturing additional words containing CAD or CDN such as decade, academy, incommunicado, etc..

 

REGEX_CountMatches([Event Options1], " "+"CAD"+" "+'\d') OR

REGEX_CountMatches([Event Options1], " "+"CAD"+'\d') OR

REGEX_CountMatches([Event Options1], '\d'+" "+"CAD"+" ") OR

REGEX_CountMatches([Event Options1], '\d'+" "+"CAD"+".") OR

REGEX_CountMatches([Event Options1], '\d'+" "+"CAD"+",") OR

REGEX_CountMatches([Event Options1], '\d'+"CAD"+" ") OR

REGEX_CountMatches([Event Options1], '\d'+"CAD"+".") OR

REGEX_CountMatches([Event Options1], '\d'+"CAD"+",") OR

 

REGEX_CountMatches([Event Options1], " "+"CDN"+" "+'\d') OR

REGEX_CountMatches([Event Options1], " "+"CDN"+'\d') OR

REGEX_CountMatches([Event Options1], '\d'+" "+"CDN"+" ") OR

REGEX_CountMatches([Event Options1], '\d'+" "+"CDN"+".") OR

REGEX_CountMatches([Event Options1], '\d'+" "+"CDN"+",") OR

REGEX_CountMatches([Event Options1], '\d'+"CDN"+" ") OR

REGEX_CountMatches([Event Options1], '\d'+"CDN"+".") OR

REGEX_CountMatches([Event Options1], '\d'+"CDN"+",") OR

 

REGEX_CountMatches([Event Options1], " "+"C\$"+" "+'\d') OR

REGEX_CountMatches([Event Options1], " "+"C\$"+'\d') OR

REGEX_CountMatches([Event Options1], '\d'+" "+"C\$"+" ") OR

REGEX_CountMatches([Event Options1], '\d'+" "+"C\$"+".") OR

REGEX_CountMatches([Event Options1], '\d'+" "+"C\$"+",") OR

REGEX_CountMatches([Event Options1], '\d'+"C\$"+" ") OR

REGEX_CountMatches([Event Options1], '\d'+"C\$"+".") OR

REGEX_CountMatches([Event Options1], '\d'+"C\$"+",")

 

Scenarios:

 

RECEIVE CAD 1.00

RECEIVE CAD1.00

RECEIVE 1.00 CAD IN

RECEIVE 1.00 CAD.

RECEIVE 1.00 CAD, AND;

RECEIVE 1.00CAD IN

RECEIVE 1.00CAD.

RECEIVE 1.00CAD, AND;

 

RECEIVE CDN 1.00

RECEIVE CDN1.00

RECEIVE 1.00 CDN IN

RECEIVE 1.00 CDN.

RECEIVE 1.00 CDN, AND;

RECEIVE 1.00CDN IN

RECEIVE 1.00CDN.

RECEIVE 1.00CDN, AND;

 

RECEIVE C$ 1.00

RECEIVE C$1.00

RECEIVE 1.00 C$ IN

RECEIVE 1.00 C$.

RECEIVE 1.00 C$, AND;

RECEIVE 1.00C$ IN

RECEIVE 1.00C$.

RECEIVE 1.00C$, AND;

2件の返信2
Felipe_Ribeir0
ネビュラ

Hi @HomesickSurfer 

 

Try this expression

REGEX_CountMatches([Field1], '(\d{1,}|\s{1,})(CAD|C\$|CDN)(\d{1,}|\s{1,}|\.{1,}|\,{1,})')

 

Felipe_Ribeir0_0-1673379143034.png

 

HomesickSurfer
クエーサー

Hi @Felipe_Ribeir0 

 

Awesome!  Many thx!  Works very well and it also filters out potential O's for 0's and duplicate $ symbols, etc.  THANK YOU

 

RECEIVE 1.0OCDN IN
RECEIVE 1.00C$$

ラベル
トップのソリューション投稿者