improved regular expressions for bigger flexibility and increased precision, all tests pass