Adding regex and rgba support. Fixing bugs