fixed substitution error in regex