created a single regex from an array of strings joined with a | character