Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String example = " (22 ; 325) ";
- String pattern = "\s*(\s*\d+\s*;\s*\d+\s*)\s*";
- final String REGEX = "\s*\(*\s*;*\s*]";
- //s+//(
- //s+;//s+
- //s+)//s+`
- (
- )
- ;
- ([0-9])w+
- String example = " (22 ; 325) ";
- String[] items = example.replaceAll("[ ()]", "").split(";");
- System.out.println(Arrays.asList(items)); // [22, 325]
Add Comment
Please, Sign In to add comment