added posix regex in test--needs optimization