yes just curiosity. I only recently started learning perl. Before I posted this question I didn't even knew lookarounds existed. Now I did a bit of reading about them and cool. If I knew about them I would have probably solved this myself. So I'm just curious if one does not know about lookarounds is this problem solvable. It would probably be very convoluted as I'm starting to think that regex is not always best for stirng matching and changing?