community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Announcement | We'll be doing maintenance between 9am-11am MT on Saturday, January 25th, which may impact your experience. Thanks for your patience as we work on improving the community!

Filtering Column for Specific Characters

Meteoroid

Hi,

 

I have a column that I would like to filter with a formula

 

200AA
Aaaa
5476
6000
200AA

 

I would like to get rid of the numbers (5476,6000) and be left with the letters and letter-number combinations.

 

I believe the regex formula would work best here, but I'm having trouble with the syntax.

Quasar

how about using the IsNumber function?

Magnetar
Magnetar

Hi,

 

In your example data there are some trailing spaces on the numbers, so I used the following filter :

 

!REGEX_Match([Field1], '\d+\s*')

This will filter any field which contains numbers followed by 0 or more spaces to the FALSE output

 

If you don't have trailing spaces in the fields in your actual data, this formula will also work:

!REGEX_Match([Field1], '\d+')
Meteoroid

all the data in the column is stored as a V_String. Would that cause the formula not to work? 

Magnetar
Magnetar

The REGEX_Match formula should work for any string field (including V_STRING).


I believe ISNUMBER() has some challenges parsing cases like this, which is where REGEX may be helpful

Alteryx Certified Partner
Alteryx Certified Partner

@amateur101,

 

I'm going to join in on the RegEx fun.

 

!REGEX_Match([Field1], "[0-9\s]+")

This will find TRUE any record that isn't just Numbers (with or without spaces).

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Labels