How to handle certain output from eval_string

I mean at a high level. This seems like a very unusual requirement, what are you trying to achieve at the big picture level?