Added support for AutoConstraints generation

This is based on the url and regex patterns.
This patch includes patch #3 which was not committed.