title: How to find first occurance of whitespace(tab+space+etc) in java?
body: <p>So I have something like this</p>
  
  <pre><code>System.out.println(some_string.indexOf("\\s+"));
  </code></pre>
  
  <p>this gives me -1</p>
  
  <p>but when I do with specific value like \t or space</p>
  
  <pre><code>System.out.println(some_string.indexOf("\t"));
  </code></pre>
  
  <p>I get the correct index.</p>
  
  <p>Is there any way I can get the index of the first occurrence of whitespace without using split, as my string is very long.</p>
  
  <p>PS - if it helps, here is my requirement. I want the first number in the string which is separated from the rest of the string by a tab or space ,and i am trying to avoid split("\\s+")[0]. The string starts with that number and has a space or tab after the number ends</p>