MT 103 50K parser

Hi All,
I want to discuss a scenario to split name and Address from MT 103 Swift Code.
image
Attached Image contain format of MT 103 50K Field.

But the case which I want to discuss you that I’m receiving the data which look like below samples
:50K:/AccountNumber
Name
Address
City

:50K:/AccountNumber
Name 1
Name 2
Address
City

:50K:/AccountNumber
Name
Address

I want to ask you is there any approach which I need to do work on it, or any Idea that will help to find difference between name and address.

Thank you.