in reply to Re: More efficient way for this pattern match?
in thread More efficient way for this pattern match?
Modifying $str2 is resetting pos($str2), so you're doing a lot of unneeded work. Adding pos($str2) = $end; at the end of the loop addresses this issue.