http://qs1969.pair.com?node_id=243988


in reply to Regex a little less greedy please

From perlre :

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"

So, changing your regex to

<APPEND.*?>
Should get you the behavior you want. If, however, you take to heart the lessons of Death to Dot Star!, you might want to write that this way:
<APPEND[^>]*>
Avoiding using the post-match variable and using () to capture the stuff you want to get is left as an exercise for the reader =)

HTH

If not P, what? Q maybe?
"Sidney Morgenbesser"