isSSN static method

bool isSSN(
  1. String s
)

Checks if string is SSN (Social Security Number).

Implementation

static bool isSSN(String s) => hasMatch(s,
    r'^(?!0{3}|6{3}|9[0-9]{2})[0-9]{3}-?(?!0{2})[0-9]{2}-?(?!0{4})[0-9]{4}$');