Merge regex patches and improve the regex again