Grab phone numbers and email from text

My way of doing this is using a text prompt and OpenAI:

Given an input like this:


Can you return a JSON structure of all phone numbers and emails in the input?

A sample structure would look like this:

"phone": "+123456789,+123456790",
"email": ","

Please return just the JSON and nothing else.


Then you can query the JSON to return the final strings.