Could someone help me with a rex to extract the domain out of a http or https URL? For example, I need 'www.test.com' to be extracted from each of the following:
http ://www.test.com?id=6
http ://www.test.com/6/7
https ://www.test.com
Hello,
Try this
search.. |rex field=Field_name "\/\/(?<URL>\\w+[\\.\\w]+)"|table URL
Thanks
Updated:
search.. |rex field=Field_name "\/\/(?<URL>\\w+[\\.-\\w]+)"|table URL
try the updated one.
Works great except for domains with a '-' in it.