I can’t seem to figure this simple thing out.
basically I have entries like:
Bree@email.com (Bree Olsen)
(Daisy Marie) +015487572
etc
I need to use just the actual address or phone number. Hence I need to delete the (any)part of the strings.
Please advise
$parenthesesContentRemoved = preg_replace('/\(.*\)/', '', $content);This should do the trick..
Or..
$parenthesesContentRemoved = preg_replace('/\s?\(.*\)\s?/', '', $content);Which should also remove the spaces around the parentheses.