Forum Discussion

jasonchrist's avatar
jasonchrist
Copper Contributor
Aug 04, 2022
Solved

Kusto evaluate and transform URL to subdomain.domain.topleveldomain format

Dear Team,   I have a question in the context of Threat Intelligence search, where I wanted to standardize free-formed URL into a specific format of subdomain.domain.topleveldomain. Sample URL: ...
  • rajamanir's avatar
    Sep 26, 2022

    jasonchrist 

    //TLD Extraction

    extend TLD = extract(@'[a-zA-Z]{1,}\.[a-zA-Z]{2,}$',0,DNS_domain)

    //Convert the entire domain into array

    extend f = split(DNS_domain,'.')

    // format the subdomain part

    extend z = array_slice(f,0,-3)

    // strcat the manupulated subdomain

    | extend subdomain = strcat_array(z,".")

Resources