You can use window.location
and its properties however, this only points to http://WWW.test-me.com/book-cat-white.HTML
-- The server side rewritten GET parameters will not be available to you.
You could try:
var match = window.location.pathname.match(/\/book-([^-]+)-([^-]+).html$/i);
// for your example - match contains: ["/book-cat-white.HTML", "cat", "white"]
A little further explanation of the Regular Expression:
/ # Start Expression
\/book- # Match '/book-'
( # Start Capture Group 1
[^-]+ # Match any character other than '-' 1 or more times
) # End Capture Group 1
- # Match '-'
( # Start Capture Group 2
[^-]+ # Match any character other than '-' 1 or more times
) # End Capture Group 2
.html # Match '.html'
$ # Match the end of the string
/i # End Expression - Case insensitive flag