How to extract a specific value from a text?

I am getting the following text from a third party API call. I am looking to extract only the credit card number and the cardholder name from it. How can I make this happen in Appian? Is there any function that could help?

"BBVA
Rewards
4000 1234 5678 9010
12/20
VALID
THRU
VISA
JOSE MARIA SANCHEZ"

 Discussion posts and replies are publicly visible