Fixed regex, added tests