in reply to Extracting Multiline Records from a file

You tell us that something doesn't work. We don't know the input data, the regex (ie we don't know what exactly is in $PhoneNumber, and we don't know in what way it doesn't work.

How do you expect us to help you?

Pleas read How (Not) To Ask A Question, and provide more information and sample data (anonymized/randomized if you don't want to exhibit any private data).