Implemented substr for buffers, and used it to chop off AZ letter to obtain region code
Improved regexes used to detect credentials