Semileptonic and rare B meson decays into a light pseudoscalar meson