Updated regexes to use block-form with gsub