in reply to Re^2: regex greedy range
in thread regex greedy range

No, I didn't forgot the question marks, and I used capturing parens on purpose. But I was answering a different question than was actually asked.

It could actually turn out more efficient with a slight variation:

m!((?>(?>(?>\w+/)?\w+/)?\w+/)?\w+/?)!;

I haven't done any benchmarks though.

Makeshifts last the longest.