Given the following string:
var snippet = \"1111 West Main Street Beverly Hills, CA 90210 Phone: 123.456.7891\"
How can I extract everythin
for a very basic way and assuming you can guarantee the format of the string you could use .components(separatedBy: "Phone: ") so anything before will be at index 0 and after index 1
var snippet = "1111 West Main Street Beverly Hills, CA 90210 Phone: 123.456.7891"
let phoneNumber = snippet.components(separatedBy: "Phone: ")[1]
print(phoneNumber)
//prints everything that appears after "Phone: " in your snippet string
//"123.456.7891"