30 bit number with constraints

In reply to Rahulkumar:

In general i am looking to understand how to write constraints for consecutive things? One problem statement i have is following. any idea for below?
100 bits width number.
Write a constraint such a way that,

  1. Number of continuous zeros will be between 2 to 5.
  2. number of continuous ones will be between 2 to 5.