title: Regular expression for string of digits with no repeated digits?
body: <p>I'm reading through the <a href="https://rads.stackoverflow.com/amzn/click/com/0321486811" rel="noreferrer" rel="nofollow noreferrer">dragon book</a> and trying to solve an exercise that is stated as follows</p>
  <blockquote>
  <p>Write regular definitions for the following languages:</p>
  <ul>
  <li>All strings of digits with no repeated digits. <em>Hint:</em> Try this problem first with a few digits, such as { 0, 1, 2 }.</li>
  </ul>
  </blockquote>
  <p>Despite having tried to solve it for hours, I can't imagine a solution, beside the extremely wordy</p>
  <pre><code>d0 -&gt; 0?
  d1 -&gt; 1?
  d2 -&gt; 2?
  d3 -&gt; 3?
  d4 -&gt; 4?
  d5 -&gt; 5?
  d6 -&gt; 6?
  d7 -&gt; 7?
  d8 -&gt; 8?
  d9 -&gt; 9?
  d10 -&gt; d0d1d2d3d4d5d6d7d8d9 | d0d1d2d3d4d5d6d7d9d8 | ...
  </code></pre>
  <p>Hence having to write <code>10!</code> alternatives in <code>d10</code>. Since we shall <em>write</em> this regular definition, I doubt that this is a proper solution. Can you help me please?</p>