fork download
  1. import java.util.regex.Matcher;
  2. import java.util.regex.Pattern;
  3.  
  4. class RegEx {
  5. public static void main(String[] args) {
  6. String s = "\"uris\" : [\"www.google.com\", \"www.yahoo.com\"]";
  7. String r = "\"uris\".*?\\]";
  8. Pattern p = Pattern.compile(r);
  9. Matcher m = p.matcher(s);
  10. while (m.find()) {
  11. System.out.println(m.group());
  12. }
  13. }
  14. }
Success #stdin #stdout 0.04s 4386816KB
stdin
Standard input is empty
stdout
"uris" : ["www.google.com", "www.yahoo.com"]