Update regular expression for string.