Working on a script for facebook and im try'n to catch url's that get hashes appended to them and redirect the page to the proper url without the hash..
for example:
http://www.facebook.com/<username>?v=app_2392950137&ref=profile#/reqs.php
I would like to redirect back to:
http://www.facebook.com/reqs.phpThe problem is there is a wide variety of possible urls in many combinations i've tried some of the url cleaner script exampe code and the regex catches most but not all the above example is not caught in this reqex:
var reg = /^(http?:\/\/([-a-z0-9]+\.)*facebook\.com)\/[^#]+#(\/.+)/i;
var ugly = reg.test(window.location.href);