> Ok, thats fine. But > ;9 echo abcdefdffghi | 9 sed 's/(abc(d?f)*)(ghi)/\1/' > > this I don't understand... > maybe it's too late for me...
you're re doesn't match at all. therefore no substitutation is made. perhaps it would be easier to see with this formulation: 9 echo abcdefdffghi | 9 sed -n 's/(abc(d?f)*)(ghi)/\1/p' - erik