title: How can I make part of regex optional?
body: <p>Suppose I have the following regex that matches a string with a semicolon at the end:</p>
  
  <pre><code>\".+\";
  </code></pre>
  
  <p>It will match any string except an empty one, like the one below:</p>
  
  <pre><code>"";
  </code></pre>
  
  <p>I tried using this:</p>
  
  <pre><code>\".+?\";
  </code></pre>
  
  <p>But that didn't work.</p>
  
  <p>My question is, how can I make the <code>.+</code> part of the, optional, so the user doesn't have to put any characters in the string?</p>