"<div></div>" =~ /(?<start>.*?)((?!\< *\/[\w\d\-]+\>).)*/; print $+{start}; # it should print <div> [download]
In reply to regex catch pattern that doesn't contain a pattern by Anonymous Monk