in reply to Iterated Regular Expression Failure

The ? delimiter is special. It means the expression is allowed to match only once, ever. That's exactly what you just described. It matches once and then never again. So change your delimiter. See also perlop on ?PATTERN?.
  • Comment on Re: Iterated Regular Expression Failure