fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4. import java.util.regex.Matcher;
  5. import java.util.regex.Pattern;
  6.  
  7.  
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. String test = "2 2";
  13.  
  14. final Pattern P = Pattern.compile("\\S \\S");
  15. final Matcher m = P.matcher(test);
  16.  
  17. if (m.find()) {
  18. System.out.println("There is between space!");
  19. }
  20. }
  21. }
Success #stdin #stdout 0.08s 33836KB
stdin
Standard input is empty
stdout
There is between space!