Preg match help

				[php] if (!empty($processed['body']) && preg_match('#([-|~_0-9A-Za-z]+)|watch\?v\=([-|~_0-9A-Za-z]+)&?.*?)#i', $processed['body'], $preg_text))
				$processed['body'] = preg_replace('#([-|~_0-9A-Za-z]+)|watch\?v\=([-|~_0-9A-Za-z]+)&?.*?)#i', '<iframe width="560" height="315" src="' . $preg_text . '" frameborder="0" allowfullscreen ></iframe>', $processed['body']);[/php]

I want to check if [tt]$processed[‘body’][/tt] contains this any URL with the pattern [tt]’#([-|~_0-9A-Za-z]+)|watch?v=([-|~_0-9A-Za-z]+)&?.*?)#i’[/tt] and if it does, it replaces that piece with [tt][/tt]… However, it keeps producing the following:

How do I accomplish what it is I want to do?

Sponsor our Newsletter | Privacy Policy | Terms of Service