' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System
Imports System.Text.RegularExpressions

Module Main
    Function IsSubDomain(host As String) As Boolean
        IsSubDomain = Regex.IsMatch(host, "[a-zA-Z0-9]*\.xxxx\.dk")
    End Function
    Sub Main()
        Console.WriteLine(IsSubDomain("yyy"))
        Console.WriteLine(IsSubDomain("xxxx.dk"))
        Console.WriteLine(IsSubDomain("aaa.xxxx.dk"))
        Console.WriteLine(IsSubDomain("bbb.ccc.xxxx.dk"))
    End Sub
End Module
