I am trying to capture the last element of the url and strip out any unwanted characters such as below
http://www.myurl.com/abcs/der/er/..../asdsad/hrllo.shtml#header?query=whatever&....
from the above URl, for example, I need to get only hrllo
var search_param = $(location).attr("href").split('/').pop().replace('#', '');
I think maybe a regex? the text hrllo can only have letters (capital or not).