http://www.perlmonks.org?node_id=967861


in reply to Re^2: Help with placing the matches of a regex into an Array
in thread Help with placing the matches of a regex into an Array

It depends on the data -- if the data is incorrectly formatted (a missing ' for instance), they may not do the same thing. And '.+?' has the tendency to be slower than '[^']+'. Usually, the more restrictive a pattern is, the faster: there's less opportunity to backtrack. There's much more commitment in '[^']+' then there is in '.+?': the former will always match two quotes in succession, and whatever is in between, regardless how the rest of the pattern looks like, but that's not the case with '.+?'; there's nothing stopping the .+? part to match quotes.