In javascript can you really produce a function that inspections an url to obtain the domain title. EG: if these websites:

world wide kingdom

world wide kingdom kingdom kingdom

were put in the function they'd be came back as " kingdom".

I'd say there's a regex means to fix this, but it will likely be complicated. You'll have to discover the last occurrence from the '.' and obtain what's next, then you need to get what's between your last and 2nd to last '.', then get anything prior to the second to last period, as much as the 3rd right (subdomain) '.'.

Does which make sense?? I am unsure from the regex needed, but here are a few questions about To enable you to get began...