• + 0 comments

    here is my reg expression

    import re
    pattern = "^((_|\.)[0-9]+[a-zA-Z]*_?)$"
    
    for _ in range(int(input())) :
        string = input()
        if re.search(pattern ,string) :
            print("VALID")
        else:
            print("INVALID")