Start a new topic

Regex Expression help for Country

Hi All 

Hoping someone may be able to help with creating an Regular Expression for me.

Due to the laws changing in the UK, we need to make all EU and UK Residents No Contact (Constituent Attribute) in our database - we are going to do this as the donation is received via our Online File, until we get our website updated with an opt in tick box.

What I want to do is create a Virtual field which seeds from the  Country field in the import profile, identifies those that have "Not AU/Australia" in the import, and flag the record as No Contact by adding a Constituent Attribute.

Apart from listing all the countries one by one, and mapping it to the attribute table in question, is there a regex that says "If Not Australia"?



What if you split the file by skipping the rows that were Australia (putting them in a separate file). then added the attribute to all records that aren't skipped.  You would have to do a 2nd import for Australia records using a layout that doesn't add the attribute.

its an option i guess, but not one we would want to pursue i think.  we have a plugin that creates these files and then applied other attributes for the batch import so its not good to split the imports.

Value to match on: ^(?!Australia)(?!AU).*$

Replacement value will be whatever you want it to be. So the replacement value will only populate if the value coming in IS NOT Australia or AU.

Brilliant! Thanks so much John!

Login or Signup to post a comment