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