extended regex, helper method