title: antlr4 grammar string with number
body: <p>I have a problem with antlr4 grammar in java.</p>
  
  <p>I would like to have a lexer value, that is able to parse all of the following inputs:</p>
  
  <ul>
  <li>Only letters</li>
  <li>Letters and numbers</li>
  <li>Only numbers</li>
  </ul>
  
  <p>My code looks like this: </p>
  
  <p>parser rule:</p>
  
  <pre><code>new_string: NEW_STRING+;
  </code></pre>
  
  <p>lexer rule:</p>
  
  <pre><code>NEW_DIGIT: [0-9]+;
  STRING_CHAR : ~[;\r\n"'];
  NEW_STRING: (NEW_DIGIT+ | STRING_CHAR+ | STRING_CHAR+ NEW_DIGIT+);
  </code></pre>
  
  <p>I know there must be an obvious solution, but I have been trying to find one, and I can't seem to figure out a way.</p>
  
  <p>Thank you in advance!</p>