title: Negate regex of validates_format_of
body: <p>In my rails model I have some kind of template system. I want to make sure that users editing it do not make accidental mistakes so I use some simple validators.</p>
  
  <p>They can use markers like <code>##user_id##</code> that will be replaced later. I want to make sure they do not enter something like <code>###user_id##</code> that contains too many <code>#</code>, so not any <code>###</code> (or <code>####</code>) must appear in the field.</p>
  
  <pre><code>class Template
    validates_format_of :text, :with =&gt; /##user_id##/, 
      :message =&gt; "##user_id## must be present"
    validates_format_of :text, :not_with =&gt; /###/, 
      :message =&gt; "Too many #"
  end
  </code></pre>
  
  <p>Unfortunately there is no <code>:not_with</code> option ... is there any chance to solve it using a <code>:with</code>-regex or should I go a separate <code>validate</code> method?</p>
  
  <p>I tried some negative look-ahead, but as there are (mostly) several <code>##</code> and only one <code>###</code> they always match one of them.</p>