         return (self.external, self.external.data(trimmed))
     }
 
-    private var regexPattern: String {
-        switch self {
-        case .email,
-             .external:
-            return rawValue
-        case .artistInvitesBrowse,
-             .artistInvitesDetail,
-             .category,
-             .invite,
-             .notifications,
-             .search:
-            return "\(ElloURI.fuzzyDomain)/\(rawValue)"
-        case .pushNotificationArtistInvite,
-             .pushNotificationComment,
-             .pushNotificationPost,
-             .pushNotificationUser:
-            return "\(rawValue)"
-        case .post,
-             .profile,
-             .profileFollowers,
-             .profileFollowing,
-             .profileLoves:
-            return "\(ElloURI.userPathRegex)\(rawValue)"
-        case .subdomain:
-            return "\(rawValue)\(ElloURI.fuzzyDomain)"
-        default:
-            return "\(ElloURI.fuzzyDomain)/\(rawValue)"
-        }
-    }
-
     private static func replaceElloScheme(_ path: String) -> String {
         if path.hasPrefix("ello://") {
             return path.replacingOccurrences(of: "ello://", with: "\(baseURL)/")


    // this is taken directly from app/models/user.rb
    static let fuzzyDomain: String = "(?:(?:w{3}\\.)?ello\\.(?:ninja|co)|ello-stag(?:ing|e)\\d?\\.herokuapp\\.com|ello-fg-stage\\d?\\.herokuapp\\.com)"
    static let usernameRegex = "([\\w\\-]+)"
    static var userPathRegex: String { return "\(ElloURI.fuzzyDomain)/\(ElloURI.usernameRegex)\\??.*" }

    static func match(_ url: String) -> (type: ElloURI, data: String?) {
        let trimmed = ElloURI.replaceElloScheme(url)

    }

    private func data(_ url: String) -> String? {
        let regex = Regex(regexPattern)
        switch self {
        case .discover:
            return "recommended"
