I've got some problems with regexp function in hive. I hope to find the top level domain in the list examples:
www.whatever.com
www.iam.com.uk
mobile.who.com.us
in this case, i should get the result of "whatever, iam, who
" so I choose to look reverse, and write regular expression:
*\.([a-z]+)\.([a-z]+)+(\.[a-z]+)?$
meaning that I only want to look at the last 2 or 3 items in the url. But it returned a dangling error. Any help appreciated!