Assert.assertThat(p.match("www.fireflysource.com/cn/app").length, is(2));
Assert.assertThat(p.match("www.fireflysource.com/cn/app")[0], is("fireflysource"));
Assert.assertThat(p.match("www.fireflysource.com/cn/app")[1], is("cn"));
p = Pattern.compile("?www.?.com/?/app", "?");
Assert.assertThat(p.match("orange"), nullValue());
Assert.assertThat(p.match("www.fireflysource.com/cn/app").length, is(3));
Assert.assertThat(p.match("www.fireflysource.com/cn/app")[0], is(""));
Assert.assertThat(p.match("www.fireflysource.com/cn/app")[1], is("fireflysource"));
Assert.assertThat(p.match("www.fireflysource.com/cn/app")[2], is("cn"));
Assert.assertThat(p.match("http://www.fireflysource.com/cn/app")[0], is("http://"));