Guest User

Untitled

a guest
May 20th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. String example = " (22 ; 325) ";
  2.  
  3. String pattern = "\s*(\s*\d+\s*;\s*\d+\s*)\s*";
  4.  
  5. final String REGEX = "\s*\(*\s*;*\s*]";
  6.  
  7. //s+//(
  8.  
  9. //s+;//s+
  10.  
  11. //s+)//s+`
  12.  
  13. (
  14.  
  15. )
  16.  
  17. ;
  18.  
  19. ([0-9])w+
  20.  
  21. String example = " (22 ; 325) ";
  22. String[] items = example.replaceAll("[ ()]", "").split(";");
  23.  
  24. System.out.println(Arrays.asList(items)); // [22, 325]
Add Comment
Please, Sign In to add comment