Modify regular expression pattern