I'm looking for a regex to match a given url wich contains something like
in order to redirect it with PHP to other new url like
to keep Google indexed urls active.
I have used next statement, but
0, so I'm doing something wrong...
Could someone help me with my regular expression?
$myURL = "/unknownnumber/knownstring1-unknownstring.html";
$do_match = preg_match('~"([0-9]+)/knownstring1-(.*?)$.html"~', $myURL, $matches);