Changed regular expression and added tests