Changed the selection function to handle multiple regex patterns.