This corrects regexp in string.