Regex to match XML Element & Content · Musings

Regex to match XML Element & Content

A quick regex to match open- and close-element tags in XML and the intermediate content, where element is the tag name.

^(.*<element.*)$(.|\n)*?(<\/element>.*)$\n