Alteryx Designer Desktop Discussions

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

RegEx Help

Melv12
5 - Atom

Hello!

 

I am looking to filter my data by using room numbers that are followed by 2 letters, but I'm having a hard time generating the correct regular expression. The room numbers could look like either of the below; they might have a letter in front, they might not, but should only be followed by two letters.

 

A103FF

103FF 

 

Thank you in advance and let me know if you need additional information.

 

Best,

Mel

 

6 REPLIES 6
JosephSerpis
17 - Castor
17 - Castor

Hi @Melv12 I mocked up a workflow let me know what you think?

Melv12
5 - Atom

Thank you, @JosephSerpis! That ended up working out well, but now I realize that some rooms are labeled something like "100-01AA". How would I need to change the expression so I can still receive what I did with the previous workflow, but now also add in the possibility of 3 numbers followed by a dash and two more numbers and letters each? So it seems that now the possible room numbers are:

 

A103FF

103FF 

103-01FF

 

Thank you for your help!

 

Best,

Mel

JosephSerpis
17 - Castor
17 - Castor

Hi @Melv12 I amended the workflow let me know what you think?

Melv12
5 - Atom

@JosephSerpis Thank you, it's working a little better, but it's dropping the two letters from "103-01FF" so it reads "103-01" instead, and the room numbers that start with a letter aren't showing (i.e. "A130BC" is showing up as "130BC"). I've attached some dummy data, if that's helpful. The only rows I don't want are 19-25 (the ones with only 1 letter).

 

Best,

Mel

 

 

JosephSerpis
17 - Castor
17 - Castor

Hi @Melv12 attached revised workflow. I also done a regex match as a alternative way to solve this. From the screenshot you can see I managed to filter out the records you mentioned. 

 

Regex_01062020.JPG

Melv12
5 - Atom

@JosephSerpis Thank you so much for your help on this! 🙂 

Labels