Using the code below:
Query query = newJdoQuery();
query.setFilter("identifier.matches('partner|account')");
query.execute();
yields no result. Why?
However, replacing the regex part with 'partner'. The query yields 1 result. Replacing it with 'account' yields another 6 results. Have a look at the image below.