Javascript dinâmico regex
str.match(new RegExp(pattern1+'|'+pattern2, 'gi'));
Raviraj Solanki
str.match(new RegExp(pattern1+'|'+pattern2, 'gi'));