Miko Posted January 13, 2011 Share Posted January 13, 2011 Hello, I'm working on a regular expression for a window.open() javascript function. This is what the string can have: window.open('http://www.google.com','windowname','width=250,height=250,left='+(screen.availWidth/2-125)+',top='+(screen.availHeight/2-125)+'');return false; This is what I already have for the check: window.open\(\'(\s)*((ht|f)tp(s?)://)[\p{L}\p{N}]+[~\p{L}\p{N}\p{Zs}\-_\.@#$%&;:,\?=/\+!]*(\s)*\'\,\''\,\''\);return false; This works for window.open('http://www.google.com','','');return false; But not yet for the other parameters, someone can help me further with this? Thanks! Link to comment https://forums.phpfreaks.com/topic/224332-regex/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.