fix regex that replaces '