I would like to search through the strings I have and pull out the domain name that may end with .com .net etc...
$string = "Just head over to nba.com";
$string = "visit cnn.net";
Please help me extract the domain name above into a variable.
Thank you in advance.