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;
Solved! Go to Solution.
Try this expression
REGEX_CountMatches([Field1], '(\d{1,}|\s{1,})(CAD|C\$|CDN)(\d{1,}|\s{1,}|\.{1,}|\,{1,})')
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$$
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |