Oh, and by the way, you seem to be just concatenating multiple regexes together if it's over the length limit. Do you mean to make them an array? I get "Unknown modifier '/'" when I try what you seem to be doing there, unless I'm misreading your code.