I'm only half sure what you're on about with that middle paragraph. :S
Most times when people worry about greediness, they should actually be using lazy quantifiers, or a negative character class.
(If I was designing regex from scratch, I'd either make lazy the default, or have no default, so that people had to learn there are three different modes, and when each is appropriate.)
If you're using back references a lot, you're likely getting into the territory where a simple parser is likely the better choice (probably using a number of smaller, more basic regexes).
|