CiviCRM

Using regex to find postcodes in CiviCRM

Advanced Search only lets you search for a range of postal codes. What do you do if you want to search for lots of different postcodes at the same time? For example you might want to search for all the postal codes that are in Austin, Texas or for the postal codes in the UK county of Hampshire.
Search Builder comes to the rescue with a handy search operator called RLIKE.
RLIKE accepts searches using regex pattern searches. In this example we are going to find the postcodes for Hampshire using 4 simple regex 'rules'.