Changing regexp instantiation client-side