The regular expression separates the beginning and end of the tag, as well as everything between them into separate groups.