Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- regular expression breaking script


jdMorgan - 9:25 pm on Jul 23, 2009 (gmt 0)


Mostly the slashes (which delimit the entire pattern), but also literal periods. This modified pattern might be what you intended:
if (code.match(/^http:\/\/(\w{0,3}\.)?youtube\.\w{2,3}\/watch\?v=[\w-]{11}/) != undefined)

Jim


Thread source:: http://www.webmasterworld.com/javascript/3958395.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com