modify merge query regex expression condition