title: Need help expanding on an anagram regex
body: <p>I am attempting to expand on this regex for listing all possible anagrams for a given set of letters:</p>
  
  <pre><code>^(?!.*([aer]).*\1)(?!(.*d){4})([aerd]*|[a-z])$
  </code></pre>
  
  <p>so far based on this regex, I can receive a match on any combination of words and sub-words made up of the letters 'dadder', such as 'adder', 'add', 'ad', 'red' etc. The reason for the regex complexity instead of a simple <code>[dadder]*</code> is because obviously each letter can be matched an infinite amount of times, which is bad, I want each letter to match the test string only once, if two d's are provided, it can match up to two times only or less. If somebody of course could streamline the regex to match any combinations of letters exactly X times specified, please feel free to provide it :)</p>
  
  <p>However my main question, I would now like to incorporate a full stop character ".". If a full stop is ever encountered in the list of characters, it acts as a wildcard and could match any character a-z. So <code>dadd.r</code> could match <code>daddzr</code>, <code>daddor</code>, <code>daddpr</code>, <code>rpdadd</code> etc.</p>
  
  <p>Could anybody help me with this?</p>