How to Use Regex in Advanced Filter


Write the following simple filter regexp which matches email addresses as an advanced filter:



Since Datameer uses Java functionality, you need to escape the backslash (\) in REGEX.

Therefore the correct formula is:

REGEX(#Email; '^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$'; 'Good'; 'Malformed') 

If you are using the formula builder it creates the correct expression out of:


If you are going to use advanced filters you need to do it manually:


and it is necessary to use an formula which returns either true or false:

IF( REGEX(#Email; '^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$'; 'Good'; 'Malformed') == 'Good'; true; false)