namePattern top-level property

RegExp namePattern
final

Implementation

final namePattern = RegExp(
    // Optional subdomain (cannot be followed by .apt)
    r"^(?:(?<subdomain>[^.]+)\.(?!apt$))?" +
    // Domain
    r"(?<domain>[^.]+)" +
    // Optional .apt suffix
    r"(?:\.apt)?$"
);