Hi guys, i have some regexp (like ^\w+[\w-.]\@\w+((-\w+)|(\w)).[a-z]{2,3}$, to match correct emails), but i cant figure out how to remove everythings that dont match the regexp in my string.
Keeping the email example, i need a way to, given a sting like
$myString = "This is some text, the email is here [email protected], and other things over here";
i need to return just '[email protected]', or boolean false, if there is no email in the strings.
Of course, the email is just an example, some others times i'll need to remove everythings except integer/floating numbers, ecc...
I've googled around so much but didn't find anything..