I had a text field and we can copy and paste url on it. Sometimes user are pasting the url twice like
"http://www.google.com/test/index.htmlhttp://www.google.com/test/index.html".
How can i find out that url is duplicated.
I tried using below code
var url="http://www.google.com/test/index.htmlhttp://www.google.com/test/index.html";
var exp =/https?:\/\//gi;
alert(url.match(exp).length);
If length is greater than 1 then it is duplicate. Trying for the any best option to find duplicate.