Changed the regex to pull out the capture groups of the regex.