Little regex help please...

From: Date: Mon, 13 Oct 2008 16:32:43 +0000
Subject: Little regex help please...
Groups: php.general 
Request: Send a blank email to php-general+get-281813@lists.php.net to get a copy of this message
Hello! Here's a regex that I got off the web that I am trying to modify for my needs, I suck at regex so desperately need some help. Basically, am trying to get a remote webpage and get the value between the <title> tags, note that it should get the values regardless if <title> is upper or lower case (case insensitive) <?php $data = file_get_contents("http://www.youtube.com/watch?v=oQ2dKXGAjNg"); preg_match('/#<title>([^<]*)</title>#/iU',$data,$match); $title=$match[1]; echo $title; ?> This is the error that i am getting when running the above: Warning: preg_match() [function.preg-match]: Unknown modifier 't' in C:\wamp\www\ezee\tests\get _remote_title.php on line 3 TIA, Ryan ------ - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-)

« previous php.general (#281813) next »