Well, you could save the url you'd like to search into a string and use the JavaScript match() method: stringObject.match(searchvalue)
to search for a specific word inside the string. If you want to, you can also opt for a different method and use Regular Expressions to search for recurring patterns within a string.
You can usually find information like this at W3Schools.
Good luck! :)