[Регулярные выражения Perl] жадность
Есть кстати дивная прога RegexBuddy - там и полный хелп есть (на англ ну и конструировать-тестировать она умеет неплохо...
By default, a quantified subpattern is "greedy", that is, it will match
as many times as possible (given a particular starting location) while
still allowing the rest of the pattern to match. If you want it to match
the minimum number of times possible, follow the quantifier with a "?".
Note that the meanings don't change, just the "greediness":
Оставить комментарий
kruzer25
Где можно почитать про субж?