# Next comes any number of single characters or nested =begin/ # =end blocks -- but the smallest number that will match... [ . | «pod_begin_end_block» ]*?
Actually I think that alternation needs to be in the other order, doesn't it? (This is within rule pod_begin_end_block.)