var one = /[a-z]/; var two = /[A-Z]/; var one_or_two = new RegExp("(" + one.source + ")|(" + two.source + ")")