I have a test in which users will be having taggings so I need the url href from the text Like i have a text
Hello World <a class="red" contenteditable="false" href="http://domainname.com/demo/forums/profile/test.name">Test </a> this is creating a problem
//I need test.name from the url
$text = $post_data->discussion;
$name = preg_match_all('#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#', $text, $match);
print_r($name);
Can anyone help me out as I am unable to do so I am failed in making regex