What is a Perl regex that can replace select text that is not part of an anchor tag? For example I would like to replace only the last "text" in the following code.
blah <a href="http://www.text.com"> blah text blah </a> blah text blah.
Thanks.