regular expressions fixed, check whole string

Regular expression now matches whole string, before the function returned true when only a part of the string matched and tests for the client added.