How about moving this all into a method that explains what is happening?  `extract_params_from_string` maybe?

Naming is hard.