I am usless at REGEX, I am trying to add a embed service for youtube hi def service.
All I want to be able to say is if the end of the URL finishes as 'fmt=18'
then embed the youtube video with the addition code of '&ap=%2526fmt%3D18' in the embed code.
I am trying to do what is in the this DOC
http://www.insideonlinevideo.com/200...tube-tests-hd/
I have got it to work, but the originak youtube filter is also being triggered as it matches as well and I end up with two embeded videos in the same post.
I am sure this is simple, but regex is not my strong point
At the moment I have my regex expresson as
[
http://]*[a-z]*?[\.]?youtube\.[a-z]*?/watch\?v=([A-Z0-9._%-]*)[&\w;=\+_\-]*[&fmt=18]
and my embed code as
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$p1&ap=%2526fmt%3D18"></param><embed src="http://www.youtube.com/v/$p1&ap=%2526fmt%3D18" type="application/x-shockwave-flash" width="425" height="350" wmode="transparent"></embed></object>
hope somebody can help me
Graham Mattingley