in reply to Removing backtracking from a .*? regexp
Perhaps the simplest way is to take two bites at the cherry.
if( $string =~ m[^a=<([^>]*)>] and $1 =~ m[$target] ) { # Do something } [download]
This is often, though not always, the quickest approach.