Javascript Regular Expression help
- by user270399
Hello! I have got the following regular expression working just fine in Rad Software Regular Expression designer.
param\s+name\s*=\s*"movie"\s+value=\s*"(?<target>.*?)"
And now i am wondering, how to get this to work in javascript. It keeps on complaininge about the "target" part. I am trying to validate and get the url from the youtube embed code.
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/ueZP6ifzqMY&hl=sv_SE&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ueZP6ifzqMY&hl=sv_SE&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
How the heck do i get this regex to work with my javascript? :)