String[] () { List<PsiElement> parts = findChildrenByType(GroovyTokenTypes.mREGEX_CONTENT); String[] result = new String[parts.size()]; int i = 0; for (PsiElement part : parts) { result[i++] = part.getText(); } return result; }