Added ability to expand back-references in regex.