Assert.assertThat(p.match("http://www.fireflysource.com/cn/app")[0], is("http://"));
p = Pattern.compile("?www.?.com/?/app?", "?");
Assert.assertThat(p.match("orange"), nullValue());
Assert.assertThat(p.match("www.fireflysource.com/cn/app").length, is(4));
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://"));
Assert.assertThat(p.match("http://www.fireflysource.com/cn/app")[3], is(""));
Assert.assertThat(p.match("http://www.fireflysource.com/cn/app/1334")[3], is("/1334"));