My $data contains "<File label=\"cat.{1,20}>(.*?)</File>"
or "<File label=\"dog.{1,20}>(.*?)</File>"
or "<File label=\"6969.{1,20}>(.*?)</File>"
how to preg match any of those choices?
preg_match("'<File label=\"cat.{1,20}>(.*?)</File>'si", $data, $url);
works only for cat. Sorry I am bad to tell what is the problem :D
preg_match("'<File label=\"(?:cat|dog|6969).{1,20}>(.*?)</File>'si", $data, $url);
this will match all of your $data :)