This is my if statement that will take this example href from the source code:
href="/toronto/2013/05/14/the-airborne-toxic-event/4296/"
from the source code
if ($text=preg_match('/href="([^"]*)"/', $text, $matches))
{
$output=$matches[1];
return $output;
}
and return
/toronto/2013/05/14/the-airborne-toxic-event/4296/
I am trying to return that url without either "/toronto" or "/toronto/" (I'm not sure which one I will need)
If you could show me the regex expression that would do that I would really appreciate it. Thanks
str_replaceinstead of a regular expression. This use case is simple enough that it's not really needed.