Alteryx Designer Desktop Discussions

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

Matching Data with Regex question

whitesummer
7 - Meteor

Hello,

 

I'm struggling with my regex.  My goal is to find a match in "child part code" field that has any number that starts with number 5 or any items that has bb or cc in it e.g. bb415h or osp-bbd649152 or osp-cc970t or 517765 or 517714.  They're all case insensitive.

 

Would you please help revise my formula.  I'm not sure what's wrong, but I think row 1 should be true because it starts with 5 but it's false in the child part code match column.

My input as attached.

 

Thank you so much.

 

2 REPLIES 2
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @whitesummer,

 

Your regex match expression of ^5 will not match as the expression must match the entire string. You could use ^5.* which would match the entire string and return you a value of true.

 

Also you could use the StartsWith() function?

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

whitesummer
7 - Meteor

Thank you so much Jonathan.  It's very helpful. I'm able to use it for other matches as well 🙂

Labels