Fixed some bugs about regex string.