title: Regex Java Scanner Delimiter
body: <p>I am trying to read this pattern... What is the <code>Scanner.useDelimiter</code> for this?</p>
  
  <p>This input is:</p>
  
  <blockquote>
    <p>489 490-1; 491-1; 492-1; 493-1; 494-1; 495-1; 496-1; 497-1; 498-1; 499-1; 500-1;<br>
    490 491-1; 492-1; 493-1; 494-1; 495-1; 496-1; 497-1; 498-1; 499-1; 500-1;<br>
    491 492-1; 493-1; 494-1; 495-1; 496-1; 497-1; 498-1; 499-1; 500-1;<br>
    492 493-1; 494-1; 495-1; 496-1; 497-1; 498-1; 499-1; 500-1;<br>
    493 494-1; 495-1; 496-1; 497-1; 498-1; 499-1; 500-1;<br>
    494 495-1; 496-1; 497-1; 498-1; 499-1; 500-1;<br>
    495 496-1; 497-1; 498-1; 499-1; 500-1;<br>
    496 497-1; 498-1; 499-1; 500-1;<br>
    497 498-1; 499-1; 500-1;  </p>
  </blockquote>
  
  <p>what I need of output is like:</p>
  
  <blockquote>
    <p>489</p>
    
    <p>490</p>
    
    <p>1</p>
    
    <p>491</p>
    
    <p>1</p>
    
    <p>492</p>
    
    <p>1</p>
    
    <p>493</p>
    
    <p>1</p>
  </blockquote>
  
  <p>I tried this delimiter but it didn't work:<br>
  <code>Scanner(readerFile).useDelimiter("\\s*-\\s*|;\\s*|\\s*");</code></p>