If your regexp engine has zero width negative view , then:
/\b((?!91)[0-9]{22})\b/
(?!91)forces the pattern to match only if the next two characters are not 91, but do not consume these characters, leaving them under the appropriate ones [0-9]{22}.
Many regexp mechanisms also allow \dfor decimal digits. If you do this, then:
/\b((?!91)\d{22})\b/
source
share