Guest User

Untitled

a guest
Jan 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1.     public static void main(String[] args) {
  2.         String test = "./skulltag-server_auto test=test";
  3.         String pattern = "([A-Za-z0-9_\\-]*)=\"(.*?)\"|([A-Za-z0-9_\\-]+)=([^\t\n]*)";
  4.         Pattern r = Pattern.compile(pattern);
  5.         Matcher m = r.matcher(test);
  6.         while(m.find()){
  7.             for(byte i=0;i<m.groupCount();i++){
  8.                 System.out.println(m.group(i));
  9.             }
  10.         }
  11.     }
  12. }
Add Comment
Please, Sign In to add comment