added support to regular expression patterns
added documentation with examples