get_target function

Get the target from a formula