Support regex matching for header values.

Needed regex support for header value, as the existing code was a bit restrictive. Thoughts on this?